Results 1 to 4 of 4

Thread: html decode problem for single quote

  1. #1
    Ext User
    Join Date
    Jul 2009
    Posts
    27
    Vote Rating
    0
      0  

    Default html decode problem for single quote

    Hi,

    I'm trying to decode the string

    var myName = 'D& #39;Souza.';(Being this a html editor,I have added a space after '&' to avoid decoding as this post renders)
    var mydata = Ext.util.Format.htmlDecode(myName);
    alert(mydata);

    I am still getting the same string. Am I missing something?

    Thanks,
    -Amod

  2. #2
    Sencha User
    Join Date
    Jul 2008
    Posts
    22
    Vote Rating
    1
      0  

    Default

    Has anybody solved this ? I have the same problem.

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    htmlDecode only changes <, >, " and &

    You will have to replace them yourself using a RegExp or render the text to a hidden element and get the innerHTML.

    ps. You can post HTML entities by using the noparse tag, e.g.
    &[noparse][/noparse]#39; will display as '

  4. #4
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,676
    Vote Rating
    9
      0  

    Default

    Quote Originally Posted by Condor View Post

    ps. You can post HTML entities by using the noparse tag, e.g.
    &[noparse][/noparse]#39; will display as '
    you can put any tag inside like &[B][/B]#39; results in '
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •