Links in Comments not opening in new window

  • Unknown's avatar

    Hi, I’m having a problem trying to get some links in comments, and in my replies to comments, to open in new window. This was working fine. I would edit the link in the comment, ticking the ‘open in new window box’ which resulted in the following text appearing after the link address:
    target=’_blank’
    All good.
    Lately, however, this has not been working. Now WordPress is automatically adding the following code after the link address
    rel=’nofollow ugc’
    and removing target=’_blank’ automatically.
    Does anybody know why this is happening and how I can get back to having links in comments open in a new window?
    Thank you.

  • Hi @annmariacoughlan, could you send a link to the affected site? We’d be happy to take a look.

    As a disclaimer: even though it sounds relatively simple, I’ve never run into someone doing this, and I’ve been here many years. Also, I just tested this on one of my sites and had no problem setting a different target. So, it might take us a bit to figure it out. But we’d be happy to look anyhow.

  • Unknown's avatar

    Hi, here’s my blog address: https://annmariacoughlan.wordpress.com/ (Sorry, I thought this would have appeared with comment.)

    Am not quite sure what you mean in ‘disclaimer’. I don’t think I’ve been doing anything unusual. I just tick the ‘open in new window’ box when entering link in reply to comment. I’m sure this is what you did to check it out on your sites? And with the link in the comment, I choose EDIT and then add the bit of code re target to the link. Used to work, but not now ….

    Hope you find something …Thanks!

  • I just mean I don’t know that we’ll have a solution unless we can consistently duplicate it.

    Could you link us to the exact page where you are editing a comment, and not using quick-edit?

  • Unknown's avatar

    OK. Thank you. I think it has something to do with the automatic code pasted after the link by WordPress i.e. rel=’nofollow ugc’. I have tried googling this but don’t really understand it.

    One other point: I’m wondering if WordPress has limited the amount of adjustments users can make by inputting code. For example, if I try to justify alignment of text by using the <p align=”justify”> …..</p> it will not work (it’s stripped out). You will see if you scroll down through comments on page below that I had justified text in previous comm

    You can see my problem in the first comment of this page. If you scroll down to my reply to comment (July 12th 2016) you will see one that I tried to amend yesterday. I renewed the links (they had changed) and both links no longer open in new windows. (They opened in new windows before I edited).

    Another point that might be useful to you is that in addition to the appearance of rel=’nofollow ugc’ and the removal of my target=’_blank’ any edited comment or comment reply also loses the text alignment adjustment! I suspect that if I press ‘edit’ on any other comment/reply I will lose the alignment automatically too.

    The mind boggles! Maybe my blog is too old!

    Welcome!

  • Comments were not really thought to be formatted with HTML. Could you share an example of the text and code you’re trying to add? We’ll see if we can reproduce this exact issue on other themes as well – your current theme as already been retired.

  • Unknown's avatar

    OK. It worked fine till recently though. Below is the text I would have added. With regard to the link code, I get the same result if I click on ‘link’ from the menu, enter the link and click the ‘open in new window’ box. If I click edit again after saving in both of the above situations, the code re alignment is gone and the code re target is gone and replaced with rel=’nofollow ugc’.

    <p align =”justify”>Hello again Sayeed. I too was shocked and dismayed by the attack in Gulshan, as I am by all the horrific terrorist attacks that have taken place around the world. My heart goes out to the families of the deceased. Having lived in Dhaka (and crossed paths with some very fine people who work with JICA) it felt very close to home. I can empathise with the fear that you feel for the future. But, no, the actions of a few will not change how I feel about Bangladesh. I concur with the views of your own Muhammad Yunus: we need a global solution to this problem. In sympathy, Ann 😢</p>

  • Unknown's avatar

    Oh, that didn’t work …. how should I submit the exact text I entered?

  • Unknown's avatar

    That didn’t work fully ….. how should I submit?

  • Ah, sorry, I should have mentioned that. Click on the code button before pasting the text, and once again after. That way the code won’t be stripped :)

  • Unknown's avatar

    <p align ="justify">Hello again Sayeed. I too was shocked and dismayed by the attack in Gulshan, as I am by all the horrific terrorist attacks that have taken place around the world. My heart goes out to the families of the deceased. Having lived in Dhaka (and crossed paths with some very fine people who work with <a href="http://www.jica.go.jp/english/news/field/2016/160706_01.html" target="_blank">JICA</a>) it felt very close to home. I can empathise with the fear that you feel for the future. But, no, the actions of a few will not change how I feel about Bangladesh. I concur with the views of your own <a href="https://www.muhammadyunus.org/news/1549/statement-from-nobel-laureate-professor-muhammad-yunus-on-terrorist-attack-on-innocent-people-in-dhaka-on-july-1-evening" target="_blank">Muhammad Yunus</a>: we need a global solution to this problem. In sympathy, Ann 😢</p>

  • Unknown's avatar

    Done! Though the emoji shows up as an emoji! I found a code online for that and it worked…..

  • The topic ‘Links in Comments not opening in new window’ is closed to new replies.