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.

Embedded blanks in Image URLs in Forum Posts

June 03, 2010 5:22am

Subscribe [4]
  • #1 / Jun 03, 2010 5:22am

    Drydocked

    26 posts

    This question may be related to a resolved thread.

    I am running the Discussion Forum 2.1.2. I am able to use the [IMG} tag to display images in-line, but I needed to set the following:

    Text Formatting in Posts: XHTML
    HTML Formatting in Posts: Allow only safe HTML
    Auto-convert URLs and email addresses into links?: Yes
    Allow Image Hot linking?: Yes

    There appears to be a bug (or maybe it’s part of the Safe HTML or XHTML formatting):

    If the URL used in the [IMG] tag contains %2O in it, the %2O is converted to a space when the post is saved. The URL that is created when the post is displayed ends at the space, so the image is not displayed correctly. See this post:

    http://www.btbff.com/index.php/btbff/RunForum/viewthread/473/

    I guess this would apply to any character entities that included in a URL?

  • #2 / Jun 03, 2010 6:13am

    Ingmar

    29245 posts

    Are you getting the same results with “Allow all HTML”? Generally it is, of course, best to avoid spaces in URLs. If they are used they must be URL-encoded; the problem is that EE converts these encoding back as a security measure.

  • #3 / Jun 03, 2010 12:10pm

    Drydocked

    26 posts

    Are you getting the same results with “Allow all HTML”? Generally it is, of course, best to avoid spaces in URLs. If they are used they must be URL-encoded; the problem is that EE converts these encoding back as a security measure.

    Agreed, I wish I could control the user-created URLs. That said…PhotoBucket’s URL generator is correctly converting embedded character entities into the “%XX” form for the URLs they give users to post in their e-mails and forums.

    The problem appears to be that when that URL in embedded in the EE Discussion Forum Message window and saved, the save process is converting it to the character (a blank space, in this case), even if “Allow all HTML” is enabled.

    When I go back in to edit the post, I find the %2O is converted to a space.

    I’ve tried several different text formatting options as well, no luck.

    Seems like the save process should leave the “safe” character entities “as is” when they’re in a URL?

  • #4 / Jun 04, 2010 7:22am

    Ingmar

    29245 posts

    Can you show us the exact code you’re trying to use?

  • #5 / Jun 04, 2010 11:59am

    Drydocked

    26 posts

    Can you show us the exact code you’re trying to use?

    I can try…in the following URL (shown inside the CODE and IMG tags), the spaces between “Test”, “Album” and “1” were actually input as the (sorry if I am using the wrong terminology) URL-encoded form of the character ” ” (i.e. %-2-0, without the dashes)

    <a href="http://i897.photobucket.com/albums/ac175/jhloo/Test">http://i897.photobucket.com/albums/ac175/jhloo/Test</a> Album 1/083.jpg

    http://i897.photobucket.com/albums/ac175/jhloo/Test Album 1/083.jpg

    I saved the post, then editted it again, and the %-2-0s have been replaced with spaces.

  • #6 / Jun 04, 2010 4:38pm

    Sue Crocker

    26054 posts

    I can reproduce the problem with both versions of the forum. I suspect it has to do with the   being cleaned too aggressively. As to whether or not it’s a bug, I’ll ask the dev team. Thanks in advance for your patience.

  • #7 / Jun 04, 2010 6:55pm

    Drydocked

    26 posts

    I can reproduce the problem with both versions of the forum. I suspect it has to do with the   being cleaned too aggressively. As to whether or not it’s a bug, I’ll ask the dev team. Thanks in advance for your patience.

    If this is of any value…the reason that this came up is that the person posting the Photobucket URL was able to successfully post the link to 2 other forums running XMB. I can also post the same link successfully to 3 other websites, but I don’t know the forum engine they are running.

    Thanks!

  • #8 / Jun 05, 2010 1:20pm

    Sue Crocker

    26054 posts

    Can you add this as a defect? It’s an issue in both 1.x and 2.x. The link for the 2.x bug list is in my signature. And please post back here with a link to the bug report.

  • #9 / Jun 05, 2010 4:15pm

    Drydocked

    26 posts

    Can you add this as a defect? It’s an issue in both 1.x and 2.x. The link for the 2.x bug list is in my signature. And please post back here with a link to the bug report.

    OK, DOne! Here’s the link…

    https://support.ellislab.com/bugs/detail/12693/

    Although I noticed that the editor used in the bug tracker did not have this issue…different tool?

  • #10 / Jun 06, 2010 2:37pm

    Greg Salt

    3988 posts

    Hi Drydocked,

    Thanks for the report. You should receive notifications as the issue is updated.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases