I donβt think that by replacing html objects and pasting them into your database, you can control the final length inserted into your tinytext.
I would choose 2 options.
- Insert the raw data into the database and use htmlentities in the output.
- Limit it to the maximum number of characters, but use a larger text type.
Depending on your application, I would choose one.
Wesley van opdorp
source share