Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jaime Israel Ramírez Hernández
Use EscapeTool in Velocity
July 26, 2009 6:50 PM
Answer

Jaime Israel Ramírez Hernández

Rank: Regular Member

Posts: 115

Join Date: April 14, 2008

Recent Posts

Hello!!!

I want to play flv and mp3 files using the media jQuery plugin in a web content template, found at the forum that I have modify a class at the ext environment in order to escape the url of the mp3, I'll rather don't modify liferay's source so I wonder...

will it work also if I use the EscapeTool from the velocity tools?, how do I use the tool if it's already installed?, how can I install it if it isn't?.

Thanks emoticon
Amos Fong
RE: Use EscapeTool in Velocity
July 27, 2009 10:58 AM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1841

Join Date: October 7, 2008

Recent Posts

Hi Jaime,

Here's the the manual at apache tools:

http://velocity.apache.org/tools/devel/generic/EscapeTool.html#url%28%29

I think you want to use it like:

#set ($url = $escapeTool.url($url))
Jaime Israel Ramírez Hernández
RE: Use EscapeTool in Velocity
July 27, 2009 11:50 AM
Answer

Jaime Israel Ramírez Hernández

Rank: Regular Member

Posts: 115

Join Date: April 14, 2008

Recent Posts

Amos Fong:
Hi Jaime,

Here's the the manual at apache tools:

http://velocity.apache.org/tools/devel/generic/EscapeTool.html#url%28%29

I think you want to use it like:

#set ($url = $escapeTool.url($url))


Thanks Amos, it worked!!!!

Well... the url seems escaped XD... In the afternoon I'll see if the media plugin can handle the mp3 and flv.

Greetings!!!!
Subhash Pavuskar
RE: Use EscapeTool in Velocity
October 23, 2013 4:01 AM
Answer

Subhash Pavuskar

Rank: Regular Member

Posts: 216

Join Date: March 12, 2012

Recent Posts

I am trying to encode are encrypt my URL at theme level, i.e using VM Template and i did some thing like this Ex :

foreach ($siteInfo in $siteInfoList)
<a href="$esc.url($siteInfo.siteURL)">$siteInfo.siteName</a>
end
Here $esc.url($siteInfo.siteURL) it wont worked for me on mouse hover it display $esc.url($siteInfo.siteURL i used velocity-tool-2.0.jar.