Page 1 of 1

putting a string containing quotation marks into a variable

Posted: Sat Apr 11, 2009 6:17 pm
by magice
Here is what I am trying to do. I need to have my user create an html link by entering the url and the clickable text. This is what I have been trying

Code: Select all

 put "<a href="" & tHtmlLink & "">" & tTextToClick & "</a>" into tNewTag
It does not work, I assume, because of the quotation marks in the string

How can I do it?

Posted: Sat Apr 11, 2009 6:56 pm
by Bernard
try
put "<a href=" & quote & tHtmlLink & quote & ">" & tTextToClick & "</a>" into tNewTag
I think you can also escape quotations with the backslash (but I use the code above and I don't have Rev installed here).

Posted: Sat Apr 11, 2009 8:12 pm
by magice
That got it, thank you very much. You guys are the best.