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.

Allow image URLs and Allow only safe HTML

August 09, 2007 7:30pm

Subscribe [3]
  • #1 / Aug 09, 2007 7:30pm

    Eric Barstad

    198 posts

    Sorry if I’m misunderstanding what Allow image URLs does, but I want to allow safe HTML (or no HTML) in an entry but still allow images to be posted. Is this possible? It seems like setting Allow only safe HTML cancels out Allow image URLs.

    For example, when I put in the html code for an image with Allow only safe HTML on, the code is displayed, not the image.

    I’m using EE 1.6 Build 20070708.

  • #2 / Aug 09, 2007 8:39pm

    Derek Jones

    7561 posts

    Your image tags, if HTML, should be converted to pMcode for you automatically, and pMcode [img] tags should work for sure.  What is the format of the image tags you are publishing?

  • #3 / Aug 09, 2007 8:39pm

    Sue Crocker

    26054 posts

    I can’t replicate the problem you are having in the most current build. We’re up to 20070726 now.

    Can you show me a link to where this is happing, or post what you’re using for the image link?

  • #4 / Aug 09, 2007 9:28pm

    Eric Barstad

    198 posts

    I should also mention my formatting is set to Textile—maybe that could be the problem.

  • #5 / Aug 09, 2007 10:19pm

    Eric Barstad

    198 posts

    Here’s my image link. I’ve added spaces at the beginning and end for this post only.

    < img class="right" src="/images/uploads/Image/town_hall_courtesy_the_anchor_.jpg" alt="" >
  • #6 / Aug 09, 2007 11:05pm

    Sue Crocker

    26054 posts

    I’ll go test with Textile. 😊

  • #7 / Aug 09, 2007 11:17pm

    Eric Barstad

    198 posts

    No, I don’t think it is Textile. I just tested on another site, and the image was viewable. Puzzling. Will test more…

  • #8 / Aug 09, 2007 11:21pm

    Eric Barstad

    198 posts

    Seems that, if the image has a class, it ends up displayed as code, but if I remove the class, the image shows up.

  • #9 / Aug 09, 2007 11:35pm

    Sue Crocker

    26054 posts

    Now *that* I can replicate. Sounds like a bug to me.

    Do you want to report it, or should I?

  • #10 / Aug 09, 2007 11:58pm

    Derek Jones

    7561 posts

    Eric, it should work if you place your class after the src= attribute.  The current Safe HTML parser is expecting that as the first attribute.

  • #11 / Aug 10, 2007 12:43am

    Sue Crocker

    26054 posts

    Ahhh, that makes a difference. I alway put my class before src.

  • #12 / Aug 10, 2007 12:44am

    Eric Barstad

    198 posts

    You can report it, Sue. Thank you.

    Derek, that worked, switching the order. The only problem is there are a bunch of images on the site where class comes first. I don’t think the Find and Replace handles regex, does it?

  • #13 / Aug 10, 2007 12:58am

    Derek Jones

    7561 posts

    No, though if you are experienced, MySQL offers regex statements that you can use with phpMyAdmin or the SQL Manager.  If you send me an email (not a PM), though, I can send you a file in the morning that will allow your image tags to work without changing the order.

  • #14 / Aug 10, 2007 1:05am

    Eric Barstad

    198 posts

    That’s ok, Derek. There weren’t as many as I’d thought. I’ve changed them over, and everything seems to be working.

  • #15 / Aug 10, 2007 11:01am

    Sue Crocker

    26054 posts

    So Derek, do we need to file a formal bug report if you’ve already fixed it? 😊

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

ExpressionEngine News!

#eecms, #events, #releases