I am working with a servlet that adds markup to text documents. For example, this
& lt; Span class = "legalTerm" & gt; According to Plaintiff
the contract was not signed
In my jsp I have the following CSS, html and jstl: < / P>
& lt; Style & gt; .legalTerm {background: light gray; color blue; Font-size: 16px; font-weight: bold; Text-align: center; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; C: Out value = "$ {document}" & gt; & Lt; / C: out & gt; & Lt; / Body & gt; & Lt; / Html & gt;
When I run an app then the document displayed in the browser looks like this:
according to & lt; Span class = "legalterm" & gt; The plaintiff's & lt; / Span & gt; The contract was never signed on
When I see the source of the page:
according to & amp; Lt; Span class = & amp; # 034; Legal Teacher & amp; # 034; End Gaze; Plaintiff & amp; Lieutenant; / Span & gt; The contract was not signed
I was able to get the right behavior by pressing save XML
My question is how should this be done?
Or am I missing something that will eliminate the need to avoid XML?
Yes, this is the right behavior and why avoid XXML - Allows you to prevent the engine to prevent Are there. The default value for escapes XML is "true" because in case of normal use it will need to be avoided.
No comments:
Post a Comment