Module:StripTags
From JoJo's Bizarre Encyclopedia - JoJo Wiki
Revision as of 03:37, 24 July 2024 by Paisley Park (talk | contribs)
Documentation for this module may be created at Module:StripTags/doc
local p = {}
local function decodeHtmlEntities(text)
local entities = {
["""] = '"',
["&"] = "&",
["<"] = "<",
[">"] = ">",
["'"] = "'",
["'"] = "'"
}
return text:gsub("(&#?[%w]+;)", entities)
end
function p.stripTags(frame)
local text = frame.args[1]
-- Remove HTML tags
text = mw.ustring.gsub(text, '<[^>]->', '')
-- Decode HTML entities
text = decodeHtmlEntities(text)
return text
end
return p
- Manga ▾
- Media ▾
- Characters ▾
- World ▾
- Archives ▾
- Misc ▾
- Wiki ▾
Retrieved from "http://jojowiki.com/index.php?title=Module:StripTags&oldid=979010"