/ Published in: ASP
URL: http://www.ralpharama.co.uk/item.php?itemid=268&page=ASP+%2F+VB+Script+Smart-tag+stripper
Expand |
Embed | Plain Text
Function fixMyEffingText(strText) strText = Replace(strText,"Source","Dest") ' Smart Open Single Quote strText = Replace(strText,Chr(145),"'") ' Smart Close Single Quote strText = Replace(strText,Chr(146),"'") ' Smart Open Double Quote strText = Replace(strText,Chr(147),Chr(34)) ' Smart Close Double Quote strText = Replace(strText,Chr(148),Chr(34)) ' Smart Short Hyphen strText = Replace(strText,Chr(150),"-") ' Smart Long Hyphen strText = Replace(strText,Chr(151),"--") ' Odd Apostrophe Top-Right strText = Replace(strText,Chr(180),"'") ' Cidilla without a letter / Odd Comma strText = Replace(strText,Chr(184),",") ' Bullet strText = Replace(strText,Chr(149),"ยท") ' Smart Dot dot dot strText = Replace(strText,Chr(133),"...") ' Bottom Quote strText = Replace(strText,Chr(132),Chr(34)) ' Approx symbol at top strText = Replace(strText,Chr(152),"~") ' Approx symbol (long) strText = Replace(strText,Chr(126),"~") ' Line Feed strText = Replace(strText,Chr(10),"<br>") ' CR strText = Replace(strText,Chr(21),"<br>") ' Do all Greater than Char 128 For i = 129 to 255 c = "&#" & i & ";" strText = Replace(strText,Chr(i),c) Next fixMyEffingText = strText End Function
You need to login to post a comment.
