lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> <a href="http://www.example.com"; alt="> example"> example </a>

Maybe you could preprocess the string, finding all substrings inside
quotes and escaping "dangerous" characters to something else;
something like this (untested):

  s = string.gsub(s, '".-"', function (p)
        return string.gsub(p, "[<>%]", function (c)
                 return string.format("%02x", string.byte(c))
               end)
      end)

-- Roberto