function html_unentities() local entities = { nbsp = ' ' , iexcl = '¡' , cent = '¢' , pound = '£' , curren = '¤' , yen = '¥' , brvbar = '¦' , sect = '§' , uml = '¨' , copy = '©' , ordf = 'ª' , laquo = '«' , ['not'] = '¬' , shy = '­' , reg = '®' , macr = '¯' , ['deg'] = '°' , plusmn = '±' , sup2 = '²' , sup3 = '³' , acute = '´' , micro = 'µ' , para = '¶' , middot = '·' , cedil = '¸' , sup1 = '¹' , ordm = 'º' , raquo = '»' , frac14 = '¼' , frac12 = '½' , frac34 = '¾' , iquest = '¿' , Agrave = 'À' , Aacute = 'Á' , Acirc = 'Â' , Atilde = 'Ã' , Auml = 'Ä' , Aring = 'Å' , AElig = 'Æ' , Ccedil = 'Ç' , Egrave = 'È' , Eacute = 'É' , Ecirc = 'Ê' , Euml = 'Ë' , Igrave = 'Ì' , Iacute = 'Í' , Icirc = 'Î' , Iuml = 'Ï' , ETH = 'Ð' , Ntilde = 'Ñ' , Ograve = 'Ò' , Oacute = 'Ó' , Ocirc = 'Ô' , Otilde = 'Õ' , Ouml = 'Ö' , times = '×' , Oslash = 'Ø' , Ugrave = 'Ù' , Uacute = 'Ú' , Ucirc = 'Û' , Uuml = 'Ü' , Yacute = 'Ý' , THORN = 'Þ' , szlig = 'ß' , agrave = 'à' , aacute = 'á' , acirc = 'â' , atilde = 'ã' , auml = 'ä' , aring = 'å' , aelig = 'æ' , ccedil = 'ç' , egrave = 'è' , eacute = 'é' , ecirc = 'ê' , euml = 'ë' , igrave = 'ì' , iacute = 'í' , icirc = 'î' , iuml = 'ï' , eth = 'ð' , ntilde = 'ñ' , ograve = 'ò' , oacute = 'ó' , ocirc = 'ô' , otilde = 'õ' , ouml = 'ö' , divide = '÷' , oslash = 'ø' , ugrave = 'ù' , uacute = 'ú' , ucirc = 'û' , uuml = 'ü' , yacute = 'ý' , thorn = 'þ' , yuml = 'ÿ' , quot = '"' , lt = '<' , gt = '>' , amp = '' } editor:ReplaceSel(string.gsub(editor:GetSelText(), "&%a+;", function (entity) return entities[string.sub(entity, 2, -2)] or entity end) ) end