All pastes #742532 Raw Edit

Something

public text v1 · immutable
·published 2007-10-19 16:29 UTC
rendered paste body
function SubHtmlTAG(Valor: String): String;
var
  X: Integer;
begin
  for X:=0 to 255 do
    begin
      Valor:=ProcuraeSubstitui(Valor,'&#'+IntToStr(X)+';',Chr(X));
    end;
  Valor:=ProcuraeSubstitui(Valor,'€',#8364);
  Valor:=ProcuraeSubstitui(Valor,'℗',#8471);
  Valor:=ProcuraeSubstitui(Valor,'­',#1);
  Valor:=ProcuraeSubstitui(Valor,' ',#32);
  Valor:=ProcuraeSubstitui(Valor,'&','&');
  Valor:=ProcuraeSubstitui(Valor,'⁄','/');
  Valor:=ProcuraeSubstitui(Valor,'>','>');
  Valor:=ProcuraeSubstitui(Valor,'&lt;','<');
  Valor:=ProcuraeSubstitui(Valor,'&quot;','"');
  Valor:=ProcuraeSubstitui(Valor,'&minus;','-');
  Valor:=ProcuraeSubstitui(Valor,'&circ;','^');
  Valor:=ProcuraeSubstitui(Valor,'&tilde;','~');
  Valor:=ProcuraeSubstitui(Valor,'&fnof;',#131);
  Valor:=ProcuraeSubstitui(Valor,'&hellip;',#133);
  Valor:=ProcuraeSubstitui(Valor,'&dagger;',#134);
  Valor:=ProcuraeSubstitui(Valor,'&Dagger;',#135);
  Valor:=ProcuraeSubstitui(Valor,'&permil;',#137);
  Valor:=ProcuraeSubstitui(Valor,'&Scaron;',#138);
  Valor:=ProcuraeSubstitui(Valor,'&lsaquo;',#139);
  Valor:=ProcuraeSubstitui(Valor,'&OElig;',#140);
  Valor:=ProcuraeSubstitui(Valor,'&lsquo;',#145);
  Valor:=ProcuraeSubstitui(Valor,'&rsquo;',#146);
  Valor:=ProcuraeSubstitui(Valor,'&ldquo;',#147);
  Valor:=ProcuraeSubstitui(Valor,'&rdquo;',#148);
  Valor:=ProcuraeSubstitui(Valor,'&bull;',#149);
  Valor:=ProcuraeSubstitui(Valor,'&ndash;','-');
  Valor:=ProcuraeSubstitui(Valor,'&mdash;',#151);
  Valor:=ProcuraeSubstitui(Valor,'&trade;',#153);
  Valor:=ProcuraeSubstitui(Valor,'&scaron;',#154);
  Valor:=ProcuraeSubstitui(Valor,'&rsaquo;',#155);
  Valor:=ProcuraeSubstitui(Valor,'&oelig;',#156);
  Valor:=ProcuraeSubstitui(Valor,'&Yuml;',#159);
  Valor:=ProcuraeSubstitui(Valor,'&iexcl;',#161);
  Valor:=ProcuraeSubstitui(Valor,'&cent;',#162);
  Valor:=ProcuraeSubstitui(Valor,'&pound;',#163);
  Valor:=ProcuraeSubstitui(Valor,'&curren;',#164);
  Valor:=ProcuraeSubstitui(Valor,'&yen;',#165);
  Valor:=ProcuraeSubstitui(Valor,'&brvbar;',#166);
  Valor:=ProcuraeSubstitui(Valor,'&sect;',#167);
  Valor:=ProcuraeSubstitui(Valor,'&uml;',#168);
  Valor:=ProcuraeSubstitui(Valor,'&copy;',#169);
  Valor:=ProcuraeSubstitui(Valor,'&ordf;',#170);
  Valor:=ProcuraeSubstitui(Valor,'&laquo;',#171);
  Valor:=ProcuraeSubstitui(Valor,'&not;',#172);
  Valor:=ProcuraeSubstitui(Valor,'&reg;',#174);
  Valor:=ProcuraeSubstitui(Valor,'&macr;',#175);
  Valor:=ProcuraeSubstitui(Valor,'&deg;',#176);
  Valor:=ProcuraeSubstitui(Valor,'&plusmn;',#177);
  Valor:=ProcuraeSubstitui(Valor,'&sup2;',#178);
  Valor:=ProcuraeSubstitui(Valor,'&sup3;',#179);
  Valor:=ProcuraeSubstitui(Valor,'&acute;',#180);
  Valor:=ProcuraeSubstitui(Valor,'&micro;',#181);
  Valor:=ProcuraeSubstitui(Valor,'&para;',#182);
  Valor:=ProcuraeSubstitui(Valor,'&middot;',#183);
  Valor:=ProcuraeSubstitui(Valor,'&cedil;',#184);
  Valor:=ProcuraeSubstitui(Valor,'&sup1;',#185);
  Valor:=ProcuraeSubstitui(Valor,'&ordm;',#186);
  Valor:=ProcuraeSubstitui(Valor,'&raquo;',#187);
  Valor:=ProcuraeSubstitui(Valor,'&frac14;',#188);
  Valor:=ProcuraeSubstitui(Valor,'&frac12;',#189);
  Valor:=ProcuraeSubstitui(Valor,'&frac34;',#190);
  Valor:=ProcuraeSubstitui(Valor,'&iquest;',#191);
  Valor:=ProcuraeSubstitui(Valor,'&Agrave;',#192);
  Valor:=ProcuraeSubstitui(Valor,'&Aacute;',#193);
  Valor:=ProcuraeSubstitui(Valor,'&Acirc;',#194);
  Valor:=ProcuraeSubstitui(Valor,'&Atilde;',#195);
  Valor:=ProcuraeSubstitui(Valor,'&Auml;',#196);
  Valor:=ProcuraeSubstitui(Valor,'&Aring;',#197);
  Valor:=ProcuraeSubstitui(Valor,'&AElig;',#198);
  Valor:=ProcuraeSubstitui(Valor,'&Ccedil;',#199);
  Valor:=ProcuraeSubstitui(Valor,'&Egrave;',#200);
  Valor:=ProcuraeSubstitui(Valor,'&Eacute;',#201);
  Valor:=ProcuraeSubstitui(Valor,'&Ecirc;',#202);
  Valor:=ProcuraeSubstitui(Valor,'&Euml;',#203);
  Valor:=ProcuraeSubstitui(Valor,'&Igrave;',#204);
  Valor:=ProcuraeSubstitui(Valor,'&Iacute;',#205);
  Valor:=ProcuraeSubstitui(Valor,'&Icirc;',#206);
  Valor:=ProcuraeSubstitui(Valor,'&Iuml;',#207);
  Valor:=ProcuraeSubstitui(Valor,'&ETH;',#208);
  Valor:=ProcuraeSubstitui(Valor,'&Ntilde;',#209);
  Valor:=ProcuraeSubstitui(Valor,'&Ograve;',#210);
  Valor:=ProcuraeSubstitui(Valor,'&Oacute;',#211);
  Valor:=ProcuraeSubstitui(Valor,'&Ocirc;',#212);
  Valor:=ProcuraeSubstitui(Valor,'&Otilde;',#213);
  Valor:=ProcuraeSubstitui(Valor,'&Ouml;',#214);
  Valor:=ProcuraeSubstitui(Valor,'&times;',#215);
  Valor:=ProcuraeSubstitui(Valor,'&Oslash;',#216);
  Valor:=ProcuraeSubstitui(Valor,'&Ugrave;',#217);
  Valor:=ProcuraeSubstitui(Valor,'&Uacute;',#218);
  Valor:=ProcuraeSubstitui(Valor,'&Ucirc;',#219);
  Valor:=ProcuraeSubstitui(Valor,'&Uuml;',#220);
  Valor:=ProcuraeSubstitui(Valor,'&Yacute;',#221);
  Valor:=ProcuraeSubstitui(Valor,'&THORN;',#222);
  Valor:=ProcuraeSubstitui(Valor,'&szlig;',#223);
  Valor:=ProcuraeSubstitui(Valor,'&agrave;',#224);
  Valor:=ProcuraeSubstitui(Valor,'&aacute;',#225);
  Valor:=ProcuraeSubstitui(Valor,'&acirc;',#226);
  Valor:=ProcuraeSubstitui(Valor,'&atilde;',#227);
  Valor:=ProcuraeSubstitui(Valor,'&auml;',#228);
  Valor:=ProcuraeSubstitui(Valor,'&aring;',#229);
  Valor:=ProcuraeSubstitui(Valor,'&aelig;',#230);
  Valor:=ProcuraeSubstitui(Valor,'&ccedil;',#231);
  Valor:=ProcuraeSubstitui(Valor,'&egrave;',#232);
  Valor:=ProcuraeSubstitui(Valor,'&eacute;',#233);
  Valor:=ProcuraeSubstitui(Valor,'&ecirc;',#234);
  Valor:=ProcuraeSubstitui(Valor,'&euml;',#235);
  Valor:=ProcuraeSubstitui(Valor,'&igrave;',#236);
  Valor:=ProcuraeSubstitui(Valor,'&iacute;',#237);
  Valor:=ProcuraeSubstitui(Valor,'&icirc;',#238);
  Valor:=ProcuraeSubstitui(Valor,'&iuml;',#239);
  Valor:=ProcuraeSubstitui(Valor,'&eth;',#240);
  Valor:=ProcuraeSubstitui(Valor,'&ntilde;',#241);
  Valor:=ProcuraeSubstitui(Valor,'&ograve;',#242);
  Valor:=ProcuraeSubstitui(Valor,'&oacute;',#243);
  Valor:=ProcuraeSubstitui(Valor,'&ocirc;',#244);
  Valor:=ProcuraeSubstitui(Valor,'&otilde;',#245);
  Valor:=ProcuraeSubstitui(Valor,'&ouml;',#246);
  Valor:=ProcuraeSubstitui(Valor,'&divide;',#247);
  Valor:=ProcuraeSubstitui(Valor,'&oslash;',#248);
  Valor:=ProcuraeSubstitui(Valor,'&ugrave;',#249);
  Valor:=ProcuraeSubstitui(Valor,'&uacute;',#250);
  Valor:=ProcuraeSubstitui(Valor,'&ucirc;',#251);
  Valor:=ProcuraeSubstitui(Valor,'&uuml;',#252);
  Valor:=ProcuraeSubstitui(Valor,'&yacute;',#253);
  Valor:=ProcuraeSubstitui(Valor,'&thorn;',#254);
  Valor:=ProcuraeSubstitui(Valor,'&yuml;',#255);
  Result:=Valor;
end;