ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Using JS in textarea

July 11, 2011 2:25pm

Subscribe [3]
  • #1 / Jul 11, 2011 2:25pm

    Austin Siewert

    129 posts

    Hi,

    I’m having issues with a text area encoding double quotes within the JS. I’m using the Wufoo embed code in a textarea. I have tried turning off protect_javascript, converted the textarea formatting to none and turned off auto urls & emails to links.

    Have any other suggestions?

    Original in CP text area:

    var host = (("https:" == document.location.protocol) ? "https://secure." : "http://");
    ...

    Template/Source:

    var host = ((“https:” == document.location.protocol) ? “https://secure.” : “http://”);
    ...
  • #2 / Jul 12, 2011 10:11am

    iain

    317 posts

    I don’t have any suggestions for you, but can confirm what’s happening to you is not what’s meant to happen when formatting is set to ‘none’.

    Just threw your code into a textarea to confirm, EE 2.2.0 and it’s outputting plain quotes.

    Any extensions installed that mess with output?

  • #3 / Jul 12, 2011 10:56am

    Sue Crocker

    26054 posts

    Thanks for the assist, iain.

    Sieburd - it works for me in 2.2.1 as well, even if I use something like Wygwam, as long as I use the [ code ] [ / code ] brackets.

  • #4 / Jul 12, 2011 3:32pm

    Austin Siewert

    129 posts

    Thanks Iain & Sue. I created a new field to test the js embed out and works now. Still don’t understand why the other textarea has issues with it.

  • #5 / Jul 12, 2011 4:20pm

    Sue Crocker

    26054 posts

    Some days, it makes no sense to figure out why. 😊 Glad things are working again for you.. If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases