Edge Rewrite
// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a27a1d5e4d0607d6

Jump to content

Module:Sandbox/Luis150902/cleanup

From Wikipedia, the free encyclopedia

-- This module escapes Unicode characters >= U+0100.

local p = {}

function p._main(s)
	local r = ""
	local i = 1
	local l = mw.ustring.len(s)
	local e = ""
	while i <= l do
	  if mw.ustring.codepoint(s, i) >= 256 then
	  	e = mw.ustring.format("&#x%04x;", mw.ustring.codepoint(s, i))
	  else
	  	e = mw.ustring.sub(s, i, i + 1)
	  end
	  r = r .. e
	  i = i + 1
	end
	return r
end

function p.main(frame)
    return p._main(frame.args[1])
end

return p