Forum: how to truncate special charactors

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3548d30217e9921c410db19ce8ce38d0?d=identicon&s=25 Sunny Bogawat (sunny_bogawat)
on 2008-09-18 12:14
   In my application I am using a list box where i am showing different
   name. I am using
   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

  character like single quote, double quote, ampersand not truncated
  please give me a standers way for doing it.
This topic is locked and can not be replied to.