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

Not a Bug Inconsistent use of double quotes in HTML links

Discussion in 'Resolved Bug Reports' started by AndyB, Nov 11, 2015.

  1. AndyB

    AndyB Well-Known Member

    XenForo has always used a single quote in HTML links.


    The inconsistency comes with the newly introduced feature called "Convert URLs to Page Titles". This feature creates HTML links using double quotes:

    Please change the following XenForo code:


    Line# 261 and 282

    $tag '[URL="' $link['url'] . '"]' $linkTitle '[/URL]';
    change to:

    $tag "[URL='" $link['url'] . "']" $linkTitle "[/URL]";
    Thank you.
    Breixo and maszd like this.
  2. Breixo

    Breixo Active Member

    Thanks for sharing @AndyB :)
  3. Chris D

    Chris D XenForo Developer Staff Member

    XF supports either syntax for URLs and both are valid.

    Regardless as to whether we change this, or not, you should assume that the software or users of the software may, at times, use syntax that isn't always consistent, as long as it is valid to do so. With that in mind, if you're reporting this because it causes a problem with one of your add-ons, you should be ensuring your code can cope with either syntax.
    Tracy Perry, Breixo, Lisa and 3 others like this.

Share This Page