Decoding URL encoded string using XSLT

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bakpao
    New Member
    • Aug 2007
    • 21

    Decoding URL encoded string using XSLT

    Is there any way to decode a URL encoded string using XSLT?

    For example, this is the string that I have:
    This%20is%20the %20%3Ctable%3E% 20tag

    And this is what I wanted XSLT to output:
    This is the <table> tag
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    not that I'm aware of...

    nevertheless, you can do some manipulation by hand
    - the best way is to do an url decoding before the string comes to xslt (if possible)
    - if you have a very limited number of percent escapes, you can use the translate() function
    - you can replace the percent escape by "&#x" {number} ";" and hope that your xslt processor can handle hexadecimal unicode entities

    regards

    Comment

    • bakpao
      New Member
      • Aug 2007
      • 21

      #3
      Thanks! I thought I missed something but there is no built in thing in XSLT to clean up the string.

      Comment

      Working...