• when entering URL with special characters in comments, URL are getting displayed as broken links as below.

    Ex: www.test-(1).com

    As default behavior of WordPress comments the entire URL should be rendered with HTML as follows <a href="www.test-(1).com">www.test-(1).com</a> but this is getting broken as it has special characters open and close braces and getting updated as follows <p><a href="http://www.test-" rel="nofollow">http://www.test-</a>(1).com</p>

    Could anyone help us to resolve this issue

    • This topic was modified 4 years, 10 months ago by Jan Dembowski.
    • This topic was modified 4 years, 10 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi!

    The standards for domain names do not permit parenthesis “()”. These may only exist in the path or query string portions of a URL. That is likely what is causing the issue.

    If you move the parenthesis after the domain name (and path), it should render correctly.

    For example, when I test entering your URL into the comments of my test WordPress install, it renders similar to your issue.

    However, when I enter this URL: https://www.test.com?test-(1) the URL renders correctly in the comments.

    • This reply was modified 4 years, 10 months ago by Dan Soschin.
Viewing 1 replies (of 1 total)

The topic ‘WordPress comments’ is closed to new replies.