You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2007/01/18 22:45:51 UTC
svn commit: r497588 - /velocity/tools/trunk/examples/showcase/esc.vm
Author: nbubna
Date: Thu Jan 18 13:45:50 2007
New Revision: 497588
URL: http://svn.apache.org/viewvc?view=rev&rev=497588
Log:
add url() method to EscapeTool showcase
Modified:
velocity/tools/trunk/examples/showcase/esc.vm
Modified: velocity/tools/trunk/examples/showcase/esc.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/esc.vm?view=diff&rev=497588&r1=497587&r2=497588
==============================================================================
--- velocity/tools/trunk/examples/showcase/esc.vm (original)
+++ velocity/tools/trunk/examples/showcase/esc.vm Thu Jan 18 13:45:50 2007
@@ -60,6 +60,9 @@
#set( $desc = 'Escapes the characters in a String using HTML entities.' )
#demo1( 'esc' 'html' 8 $desc )
+#set( $desc = 'Escapes the characters in a String using UTF-8 URL character encoding.' )
+#demo1( 'esc' 'url' 8 $desc )
+
#set( $desc = 'Escapes the characters in a String using Java String rules.' )
#demo1( 'esc' 'java' 8 $desc )
@@ -78,6 +81,7 @@
#set( $java = "He didn't say, ${esc.q}Stop!${esc.q}" )
#set( $javascript = $java )
#set( $html = '<bread> & <butter>' )
+#set( $url = 'food/dinner?appetizer=bread & butter' )
#set( $xml = $html )
#set( $sql = "McHale's Navy" )
@@ -96,6 +100,9 @@
${esc.d}html
${esc.d}esc.html(${esc.d}html)
+
+${esc.d}url
+${esc.d}esc.url(${esc.d}url)
${esc.d}xml
${esc.d}esc.xml(${esc.d}xml)