1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Trailing white-space breaks the URLs

Discussion in 'Resolved Bug Reports' started by Shadab, Aug 19, 2010.

  1. Shadab

    Shadab Well-Known Member

    Sample bbcode:
    [url]http://www.xenforo.com [/url]

    On First Save:

    ie, on creation of a thread/post or when you insert a new link in an existing post,
    it gets POSTed as:
    <p>[url]http://www.xenforo.com [/url]</p>
    which is rendered on the thread page just fine, since the browser (Firefox 3.6.8 in my case) ignores the trailing whitespace in the href attribute.
    <a class="externalLink" target="_blank" href="http://www.xenforo.com ">http://www.xenforo.com </a>

    On Subsequent Saves:

    ie, when you edit and save a post which contains such a link,
    it gets POSTed as:
    <p><a href="http://www.xenforo.com%20" _mce_href="http://www.xenforo.com " target="_blank" [...]
    which is rendered as a broken link on the thread page, since the browser won't ignore encoded trailing spaces.
    <a class="externalLink" target="_blank" href="http://www.xenforo.com%20">http://www.xenforo.com </a>

    See it in action here:
    On a sidenote; this also happens when you enter a URL with trailing space(s) via the "Insert/edit link" button in the rich-text editor.
  2. Mike

    Mike XenForo Developer Staff Member

    Fixed, though not necessarily retroactively.
    Shadab likes this.

Share This Page