Escape character problem


#1

Hi, i need to construct a link as following

“<a href=”#{CONFIG[‘URLS’][‘Xyz’]}#{url}"#{tag_options}>#{name ||
url}"

But here due to escape character #{url} not give actual value it
treated as a string. how to solve this ?
if i do
“<a href=”#{CONFIG[‘URLS’][‘xyz’]}\#{url}"#{tag_options}>#{name ||
url}"
then #{url} gives me proper value but link is wron constructed?

please suggest me solution.


#2

Sunny B. wrote:

Hi, i need to construct a link as following

“<a href=”#{CONFIG[‘URLS’][‘Xyz’]}#{url}"#{tag_options}>#{name ||
url}"

But here due to escape character #{url} not give actual value it
treated as a string. how to solve this ?
if i do
“<a href=”#{CONFIG[‘URLS’][‘xyz’]}\#{url}"#{tag_options}>#{name ||
url}"
then #{url} gives me proper value but link is wron constructed?

please suggest me solution.

Not sure, but there is an “h(…)” function available to ‘escape’ code
the enclosed content. Have you tried it?