I have a form written in asp (using XMLDOM techniques), everything works perfectly, except...if the input string contains "&", it will expands as "& amp;" entity reference, which I do not want since I wish to store as is otherwise Unicode characters wouldn't be able to show up on the browser properly. The alternative solution is to write a script to do a search and replace but...it's inefficient since the contents are changing all the time!!! Any ideas are very much appreciate... ------------------ T.T [This message has been edited by Trina Thach (edited June 21, 2001).]
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
posted 18 years ago
Well, since the input says as "& #7848;" (no whitespace in between) being stored as "& amp;#7848;" - automatically converted by the parser...we eventually end up showing "Ẩ" on the browser, which is totally wrong. All I need is to be able to save the input exactly as it is (do not expand it). ------------------ T.T
Rita, The whole idea is to make sure the browser renders it properly, and we know that everything in the CDATA section will be ignored by the browser so...we end up the same problem.
Leverager of our synergies
posted 18 years ago
Ha! You figured out my name! Trina, I do not quite understand how you show user input, I assumed that you somehow store it in XML and then apply XSLT stylesheet to render the content. In this case, if you have <someElement><![CDATA[ 8 TEXT ]]></someElement> in XML, and apply <xsl:value-of select="someElement" disable-output-escaping="yes" /> then the browser shows �8�, which is the correct representation for ASCII 56.
Rita, Remember a week or 2 back? I sent you an email regarding IBM XML Cert. I did look at your profile...that's how I know your name. You see, I should use XSLT to produce HTML but I use XSL for XML to show on the web (for a special reason). Anyway, the problem is solved. Thank you all.