Spaces in links

AllenAllen Registered Users Posts: 10,008 Major grins
edited February 27, 2014 in Dgrin Forum Support
Just a heads up, something this forum software has been doing for a long time.

I have two links in this post that a space is added in the link. At the right end of
both I bolded the letter before the space so it wouldn't add the space.
post #5 popular%2F Birds%2F
http://www.dgrin.com/showthread.php?p=1942306#post1942306

With the space in there viewers could not copy and get the code to work especially in old blocks like frames.
Al - Just a volunteer here having fun
My Website index | My Blog

Comments

  • ian408ian408 Administrators Posts: 21,904 moderator
    edited February 26, 2014
    Allen wrote: »
    Just a heads up, something this forum software has been doing for a long time.

    I have two links in this post that a space is added in the link. At the right end of
    both I bolded the letter before the space so it wouldn't add the space.
    post #5 popular%2F Birds%2F
    http://www.dgrin.com/showthread.php?p=1942306#post1942306

    With the space in there viewers could not copy and get the code to work especially in old blocks like frames.

    I copied the URL in that post. I then created a test post with several variations. 1) No text formatting. 2) No text formatting and enclosed in CODE tags. 3) No text formatting and enclosed in URL tags. These all work (the first is recognized as a URL and URL tags added).

    Only when I leave the text formatting in does the link become corrupted. Then it's transformed from this:
    [noparse]https://secure.smugmug.com/login?goTo=http%3A%2F%2Fwww.photosbyat.com%2Fpopular%2Fi-nTFdJgh[/noparse]

    to this:
    [noparse]https://secure.smugmug.com/login?goTo=http%3A%2F%2Fwww.photosbyat.com%2Fpopul ar%2Fi-nTFdJgh[/noparse]

    The problem occurs when you embed BBCODE within a URL. If you want to maintain the BBCODE formatting, enclose the BBCODE within URL tags. Like this:
    [noparse]
    [url=https://secure.smugmug.com/login?goTo=http%3A%2F%2Fwww.photosbyat.com%2Fpopular%2Fi-nTFdJgh]https[B]:[/B]//secure.smugmug[B].[/B]com/login?goTo=http%3A%2F%2Fwww.photosbyat.com%2Fpopu[B]l[/B]ar%2Fi-[COLOR=Red]nTFdJgh[/COLOR][/url]
    [/noparse]
    
    https://secure.smugmug.com/login?goTo=http%3A%2F%2Fwww.photosbyat.com%2Fpopular%2Fi-nTFdJgh

    Hope that helps.
    Moderator Journeys/Sports/Big Picture :: Need some help with dgrin?
  • AllenAllen Registered Users Posts: 10,008 Major grins
    edited February 26, 2014
    The problem in the past was first noticed when pasting in a long string of the old slideshow code.
    The code copied with the spaces included. Any spaces in it would break the code. This commonly
    happened.

    Have not seen the spaces for quite awhile.
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • ian408ian408 Administrators Posts: 21,904 moderator
    edited February 26, 2014
    Allen wrote: »
    The problem in the past was first noticed when pasting in a long string of the old slideshow code.
    The code copied with the spaces included. Any spaces in it would break the code. This commonly
    happened.

    Have not seen the spaces for quite awhile.

    Can you point to an example of that? Your original post talked about links.
    Moderator Journeys/Sports/Big Picture :: Need some help with dgrin?
  • AllenAllen Registered Users Posts: 10,008 Major grins
    edited February 26, 2014
    ian408 wrote: »
    Can you point to an example of that? Your original post talked about links.
    It's been quite awhile so don't think I could find any.
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • AllenAllen Registered Users Posts: 10,008 Major grins
    edited February 26, 2014
    See bottom of first post here
    http://www.dgrin.com/showthread.php?t=68430
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • ian408ian408 Administrators Posts: 21,904 moderator
    edited February 27, 2014
    Allen wrote: »
    See bottom of first post here
    http://www.dgrin.com/showthread.php?t=68430

    Same deal. Only you are embedding HTML (only some of which is parsed and executed) in your posts. In that example, you would have used the CODE tags to include it without having to change the font or bold. By changing the font with a BBCODE, you stop the processing of the HTML.

    You can also use NOPARSE tags although these don't always work the way you want them to.
    Moderator Journeys/Sports/Big Picture :: Need some help with dgrin?
Sign In or Register to comment.