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.

ee stripping code

April 28, 2008 5:43pm

Subscribe [3]
  • #1 / Apr 28, 2008 5:43pm

    shefinds

    19 posts

    i’m trying to install this code on http://shefinds.com/blog/index.php/weblog/comments/get_your_beauty_forecast/
    it’s not showing up - the developer says ee is “stripping” the code - is there a reason this is happening? how can I stop it?

    <!-- USE TO OPEN A POPUP AND DISPLAY HTML CODE TO PUBLISH ON myspace.com  -->
    
    function displayPreview(URL, pantalla, tools, direcciones, estado, barramenu, barrascroll, resize, width,height, left, top, sustituir){
         var options2 = "fullscreen=" + pantalla +
                     ",toolbar=" + tools +
                     ",location=" + direcciones +
                     ",status=" + estado +
                     ",menubar=" + barramenu +
                     ",scrollbars=" + barrascroll +
                     ",resizable=" + resize +
                     ",width=" + width +
                     ",height=" + height +
                     ",left=" + left +
                     ",top=" + top;
            var ventana = window.open(URL,"_blank",options2,sustituir);
    }
  • #2 / Apr 28, 2008 5:51pm

    Ingmar

    29245 posts

    Are you inserting that code into an entry, or a template? In CP Home ›  Admin ›  Weblog Administration ›  Weblog Management ›  Edit Weblog, do you allow “All HTML”?

  • #3 / Apr 28, 2008 6:00pm

    shefinds

    19 posts

    yes I checked - “allow all html” is selected.

  • #4 / Apr 28, 2008 6:02pm

    Ingmar

    29245 posts

    Let me repeat: Is that an entry, or a template? Looks like the former, can you confirm?

  • #5 / Apr 28, 2008 6:09pm

    shefinds

    19 posts

    it’s an entry.  also - the developer says that even the script I’m posting on this message board is being stripped.

    I’m trying to attach the script to this as a text file, but it won’t let me so I’m attaching as jpg.

    also this is what he said to me - but I don’t speak tech so not sure what I’m supposed to do in the cp

    I’m afraid that the posting on forum is not correct.  The line completely missing from the posting (I’m sending a screen capture showing this - shefinds-ee.jpg).

    Now, I was looking at the HTML soruce code from http://shefinds.com/blog/index.php/weblog/comments/get_your_beauty_forecast/ and although it is included, the output is using HTML encoding (shefinds-html.jpg).  Would it be possible for you to try to fix this?

  • #6 / Apr 28, 2008 7:43pm

    Sue Crocker

    26054 posts

    shefinds, let’s step back a bit. What is the reasoning behind having the javascript in an entry? Wouldn’t it make more sense for it to be in a template instead?

  • #7 / Apr 29, 2008 9:19am

    shefinds

    19 posts

    hi - it’s to get our readers to subscribe to our widget so I want to put it in a blog post so it will go into rss readers.

  • #8 / Apr 29, 2008 10:36am

    Robin Sowell

    13255 posts

    Even with ‘Allow all HTML’, some things will be stripped for security reasons- which look like what you’re running into here.  There are some different ways you might approach it with custom code, but if the goal here is to simply get the widget showing- I’d put the code in a template.

    Now for rss- some readers are likely to strip it out anyway- again due to security- but you can try getting it in there by simply hard coding it.  Just look at the rendered output of your rss feed- copy an ‘item’ grouping and hard code the info.  Again- I wouldn’t expect this to work across readers, but you should be able to see if it works in the raw feed.

    Make sense?

  • #9 / Apr 29, 2008 11:09am

    shefinds

    19 posts

    so just so I’m clear -  this is a security feature of ee that can’t be turned off without hiring a developer?

  • #10 / Apr 29, 2008 11:41am

    Robin Sowell

    13255 posts

    Well- like I say- I’d put it in a template.  But I did get it in there by creating a global- pasting the js- then using the global in the entry- example: http://media-cow.com/site/test/ - reveal code- think the js is correct.  It’s just echoed out since it’s in a global.  Would that work?

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

ExpressionEngine News!

#eecms, #events, #releases