java - spring.tld tag library attributes differences -


in many tags of spring.tld there attributes: htmlescape javascriptescape

the question may seem trivial, difference html escape , javascript escape in context?

well htmlescape use escape literal within html document. example, if html document contains special characters, escaped follows:

original : <    >    "      & escaped  : &lt; &gt; &quot; &amp; 

javascript escape apply across javascript literal. suppose have literal:

<script>     function helloworld(){         alert('<html:message javascriptescape="true" code="hello" />')     } <script> 

applying javascript escape single , double quotes, newline chars, tabs, etc.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -