This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local t = [[ your html ]] | |
-- list of strings to replace (the order is important to avoid conflicts) | |
local cleaner = { | |
{ "&", "&" }, -- decode ampersands | |
{ "—", "-" }, -- em dash | |
{ "’", "'" }, -- right single quote | |
{ "“", "\"" }, -- left double quote | |
{ "”", "\"" }, -- right double quote | |
{ "–", "-" }, -- en dash |