Quotes in JavaScript string are converted to HTML entities

Hi Radiant users,

I try to use the solution found at
http://lists.radiantcms.org/pipermail/radiant/2006-May/000261.html to do
client-side Mailer form validation using Prototype.

At the line:

The ‘mailer-form’ string is converted to ‘mailer-form’

So this script is unusable. How can I prevent this automatic conversion
to HTML entities?

Thanks!

Jonathan

if you are using textile you can either disable it, or wrap the
content that shouldnt be processed in …
blocks.

Jonathan Métillon wrote:

So this script is unusable. How can I prevent this automatic
conversion to HTML entities?
I found that this is the Textile filter that’s converting the quotes.

So I simply created a new snippet with no filter where I put the
JavaScript code and I include it from my Mailer form. Now the
client-side validation is working great!

J.

:smiley:

Also using a snippet, I don’t have to touch the extension hard code.

Jonathan

Let me correct : when I posted my message about snippets, I did not
actually test it because I already had converted all my form to pure
HTML and simply deactivated Textile filter.

But now I have another form, which is still using Textile. And I
included my snippet, containing the JavaScript. And the JavaScript is
again f***d up! So I added the … tag and it
looks better, but one character remains converted: it’s & (the
ampersand) that is converted to &

And I really need it because I can’t use the JavaScript AND operator
(&&)! Do you know how to stop Textile from escaping the ampersand?

Thank you.

Jonathan

I suppose that having the Javascript in a different snippet and
including
it in the original snippet won’t work since the textile filter will be
applied to all the complete snippet output. I’m right?

/AITOR

Have you tried wrapping the code in a CDATA tag? Textile might ignore
that.

Sean

Aitor Garay-Romero wrote:

I suppose that having the Javascript in a different snippet and including
it in the original snippet won’t work since the textile filter will be
applied to all the complete snippet output. I’m right?

/AITOR

You are :slight_smile:

Jonathan

On Aug 27, 2007, at 11:47 AM, Jonathan Métillon wrote:

//>>/ So this script is unusable. How can I prevent this automatic
/>>/ conversion //to HTML entities?//
/>>/
/>>/ Jonathan
/>

On /Mon Aug 27 15:55:56 GMT 2007/, Andrew B. wrote:

if you are using textile you can either disable it, or wrap the
content that shouldnt be processed in …
blocks.

Excellent, I didn’t know about that . And is there also
and ?

I still prefer to use a snippet, against wrapping the code in

:smiley:

Also using a snippet, I don’t have to touch the extension hard code.

Jonathan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs