Changed shaping while limiting the use of symbols in the TBS library

I am getting the description from a database (MySql). I am storing the description in html format. When I show a description with a char constraint, it shortens some tags to make the formation change. So, any idea how I can fix this issue.

The database description is stored as:

<b>Hello</b><br/><p>This is my HTML code</p>

      

When I use a string constraint when displaying this description like limit = 8 then Hello will be in bold, but after hello world, all other content will be in bold.

The limit is 8, so it is calculated from the database before <b>Hello

. This </b>

one will not be counted so that the tag <b>

does not end and other content is in bold.

+3


source to share





All Articles