Link to home
Start Free TrialLog in
Avatar of harris9999
harris9999Flag for United Kingdom of Great Britain and Northern Ireland

asked on

XHTML Compliance - Microsoft word apostrophe

Hi I have a news page updated by a control panel which users just often copy and paste news items from a Microsoft Word document.  I want the output page to be html compliant and have a replace function on the page for the & symbol and a few others.  I cannot find one for the curly apostrophe that comes from the Word Document.

server.htmlencode will not work as i want to be able to include html links in the item.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of kevp75
kevp75
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of harris9999

ASKER

Hi,

I want to be able to include the html tag in the text area, so that a link could be added if required.  Thats why i can't use, server.htmlencode.  
I just noticed a typo in my initial message.  i want the output to be xhtml compliant.  
In the page where it is output i replace the & symbol etc

                  strText = replace(rs.fields("Details"),"’","'")
                  strText = replace(strText,"&","&")
                  strText = replace(strText,"’","'")
                  strText = replace(strText,"’","'")
                  strText = replace(strText,"‘","'")
                  strText = replace(strText,"’","'")

i have tried to replace the various aprostophe's but i can't get one to replace the apostrophe which is pasted from a word document, and it is this one which breaks the xhtml compliance.
strText = replace(strText, Chr(146),"'")

This fixed the problem