how to escape and pass html as variable

K

khinester

hello,
from my code,

http://paste.lisp.org/+2EKJ

in the description: "", this works.

but if i add any html, such as description:"<p font="12px">
description </p>", does not work.

is there a way to do this without escaping the font="12px"

thanks
 
M

Martin Honnen

khinester said:
in the description: "", this works.

but if i add any html, such as description:"<p font="12px">
description </p>", does not work.

is there a way to do this without escaping the font="12px"

You could use single quotes to delimit the string literal:
description: '<p font="12px">description<\/p>'

Note that HTML does not have an attribute named 'font':
http://www.w3.org/TR/html4/index/attributes.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top