Hi,
In my application I am using a list box where i am showing different
groups
name. I am using
<%=truncate_html_strip_textual_wrap(group.name,28,28)%>
for truncating the name but it gives me problem when group name come
like Shital’s friends from “Office” Group this
In list box it showing as a Shital's friends from & quote..
how to avoid such a thing? whats a proper way for handling such a
situations?
character like single quote, double quote, ampersand not truncated
properly
please give me a standers way for doing it.
Could you explain with an example I am not understanding you?
Your problem is that truncating works on a character by character
basis, which has the inbuilt assumption that it’s ok to cut off at any
point.
If you have for example & then it’s not find to cut in the middle
of that. Therefore it is a lot easier to do any truncation before you
stick in the & and other things like that (or write a version of
truncate that understands entities and that they should not be messed
with.