• I’m new to WordPress, but am getting to grips with it quite quickly. However, I’ve come across an issue that I’d appreciate help with.

    I have one site that I want to link to that includes some square brackets in the URL. When I paste this into WP it strips the square brackets out, with the result that I finish up on a different webpage. Even if I manually re-insert the brackets, WP strips them out again. Why does this happen, and how can I prevent it happening?

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter raywp

    (@raywp)

    It’s done it again. The brackets should be after the ?bb

    bb[0]

    Thread Starter raywp

    (@raywp)

    The site is https://www.raycastell.co.uk/wordpress. It’s just an experiment at the moment, so ignore the nonsense!

    Hi Ray, I didn’t realize that you were referring to the Blogroll widget in your sidebar… in that case there’s no easy way around what WP is doing to your URL. The nitty gritty is that when you save the link WP uses several sanitization functions to clean up the URL, one of which is apparently stripping the square brackets.

    You might want to look at using the text widget instead to add some links to the sidebar.

    Worth noting, that adding these links to the content area of a post seems to work just fine with no interference from the shortcodes filter.

    Thread Starter raywp

    (@raywp)

    Many thanks. I’ll try using a text widget tomorrow. Was you post clipped? I have “The nitty gritty is that when you save the link WP uses “. It looks as though something is missing?

    Jackson, your support has been totally excellent. What is the best way for me to express my satisfaction, both to you and to WordPress, which I think will help me personally and professionally as I become more familiar with it?

    I think I was editing my post, which is why it looked clipped.

    Happy to help, just spread the love and keep on using WordPress!

    Thread Starter raywp

    (@raywp)

    Links in the Text Widget worked! I’ve even learnt a bit of html in the process

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Square brackets removed from links’ is closed to new replies.