HTML Decode using XTemplate

  1. #1

    HTML Decode using XTemplate

    I'd like to be able to decode, HTML encoded text when using a XTemplate.

        <ext:XTemplate ID="Tpl7" runat="server">   
       <div id="articleBody{MediaContentId}" class="ArticleBody" title="Shows the article that was clipped out">{escape({Body})}<br /> 
            </tpl>     
        </ext:XTemplate>
    How can I achieve this?
  2. #2

    RE: HTML Decode using XTemplate

    Hi,

     <ext:XTemplate ID="Tpl7" runat="server">   
       <div id="articleBody{MediaContentId}" class="ArticleBody" title="Shows the article that was clipped out">{Body:htmlDecode}<br /> 
            </tpl>     
        </ext:XTemplate>
  3. #3

    RE: HTML Decode using XTemplate

    My text is stored in DB like this:

    %3CFONT%20color%3D%23ff0000%3E%26nbsp%3BThis%3C/FONT%3E%20is%20%3CSTRONG%3Emy%3C/STRONG%3E%20%3CU%3Etext%3C/U%3E
    I want:

    This is my text...

    :htmlDecode

    Returns the above string...

Similar Threads

  1. [CLOSED] JSON Decode Exception
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Sep 28, 2012, 2:58 PM
  2. html decode textarea
    By maxdiable in forum 1.x Help
    Replies: 2
    Last Post: Jan 22, 2010, 3:54 AM
  3. html decode on combo box
    By [WP]joju in forum 1.x Help
    Replies: 1
    Last Post: Dec 22, 2009, 6:20 AM
  4. [CLOSED] [1.0] Decode HTML characters
    By danielg in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 22, 2009, 6:12 AM
  5. Ext.decode on server side
    By nanosassa in forum 1.x Help
    Replies: 1
    Last Post: Jun 12, 2009, 3:00 PM

Posting Permissions