View/Edit #52:de_literal_text

Switch to edit mode.

Name(s): de_literal_text
1:  "Copied from HTML utilities (#52):literal_text by Hacker (#60)Dec  9 19:00:55 2001"
2:  "Escape out all < > \" and & characters so that the text won't be interpreted"
3:  {text} = args
4:  if (typeof(text) == $LIST)
5:    for x in [1..length(text)]
6:      text[x] = strsub(strsub(strsub(strsub(text[x], "&lt;", "<"), "&gt;", ">"), "&quot;", "\""), "&amp;", "&")
7:      $cmd_utils:suspend_if_needed()
8:    endfor
9:    return text
10: elseif (typeof(text) == $STR)
11:   return strsub(strsub(strsub(strsub(text, "&lt;", "<"), "&gt;", ">"), "&quot;", "\""), "&amp;", "&")
12: else
13:   return tostr(text)
14: endif
15: "Last modified by Dax (#789) on Thu Aug  4 11:50:41 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Hacker (#60)

You are not logged in.

[home | help | who | search | setup | code]