Forums

[resolved] [closed] comment link problem (21 posts)

  1. whooami
    Member
    Posted 5 years ago #

    perhaps someone can point me in the right direction to fixing this...

    i noticed that my blog has this odd habit:

    its taking links within comments like so:

    http://www.test.com

    (which out to be converted to clickable links)

    and turning them into

    <a >http://www.test.com</a>

    viewing the source in firefox you dont see that space in ff (it removes it) however I can see it in ie.

    It's something thats filtering because the actual comment content is not being changed in the db. Would this be a kses.php issue? Ive uploaded a brand new one, and that hasnt fixed it.

    Ive also disabled EVERY plugin one by one, AND grep'd every file for <a > and <a>

    I do not and never had <a disabled in kses.php either.

    any pointers on how I might troubleshoot this further would be appreciated.

  2. Mark (podz)
    Support Maven
    Posted 5 years ago #

    Could it be a TinyMCE issue?
    Do you use the editor?

  3. whooami
    Member
    Posted 5 years ago #

    no, and these are actually comments.. post content is fine.. its VERY odd

  4. whooami
    Member
    Posted 5 years ago #

    This is mindboggling -- im just going to diff all the files and look for obscure changes that might be affecting this.

  5. whooami
    Member
    Posted 5 years ago #

    ive narrowed it down to a plugin, aha! I set up test-install and uploaded all of the same plugins i have on my main blog.. AFTER i diff'd all the files and saw there wasnt anything that might be breaking it :)

    --

    this all came about because I noticed my wp-chunk plugin was behaving differently on my site (the output wasnt valid). Initially, I thought it was the plugin :(, but then after looking at another site thats using it, I relaized it IS valid on their site.

    Thanks for the suggestion, all the same Podz, Im off to disable plugins one by one on the test install :)

  6. whooami
    Member
    Posted 5 years ago #

    its ozh_clickcounter

  7. whooami
    Member
    Posted 5 years ago #

    Ok, that was just one problem .. here is what I have done now:

    on my sandbox blog I emptied all the mysql tables to start fresh with the defualt posts, no plugins, no comments except the mr. wordpress one.

    So, on a fresh install of 2.03 I post 2 comments:

    1: a simple URL without the <a href stuff, just a link.

    The link was made clickable and turned into a normal url complete with the <a href stuff

    2. an html'd link, complete with the <a href= stuff

    the outcome :

    <a href="http:// www. link. com" rel="nofollow">
    <a href='http:// www. link. com' rel='nofollow'>http:// www. link. com</a></a>

    Ive broken the links on purpose hoping that helps the display

  8. whooami
    Member
    Posted 5 years ago #

    you will notice the duplication.. this is a vanilla install first 2 comments, and absolutely no plugins, fresh db.

    Ideas?

    podz can you duplicate this? or is this something thats been adressed somewhere else?

    also, i am not using the comment editor to insert or edit these comments, they came through the normal comment submission form.

  9. whooami
    Member
    Posted 5 years ago #

    Ok.

    I think this is a bug. Inside functions_formatting.php, I edited the nofollow tags so that I could figure out what was doing what

    there are 2 functions that filter links,

    make_clickable and wp_rel_nofollow

    I edited the no_follow function so that it outputs: nofollow-function.

    I edited make_clickable so that it outputs:
    nofollow-clickable

    After that, I posted a comment via the normal fashion, and the result:

    <a href=" http:// www.test. com" rel="nofollow-function">
    <a href=' http:// www. test.com' rel='nofollow-clickable'> http: //www.test. com</a></a>

    You can see that both functions are working, and that the nofollow function is actually adding content to comment

  10. whooami
    Member
    Posted 5 years ago #

    anyway, the fix for this, for me atleast is to disable the nofollow function, the make clickable already handles it.

    Im guessing this is repeatable, perhaps its just never been noticed, but I find that hard to believe.

  11. whooami
    Member
    Posted 5 years ago #

    fwiw, removing the nofollow function from the default filters doesnt fix this. It still repeats the content, it just doesnt include the nofollow tag.

  12. whooami
    Member
    Posted 5 years ago #

    ive submitted a bug report; it only occurs when you do something like this:

    <a href="http:// www. link. com">http:// www. link. com</a>

    leaving the second http` off makes it filter properly. I dont expect it to be fixed since a search for html comments both here and on trac resulted in more than a few "the fix is not to allow html in comments".

    oh well.

  13. whooami
    Member
    Posted 5 years ago #

    the source of the problem is the clean_url function.

  14. Yosemite
    Member
    Posted 5 years ago #

    *sits back munching on popcorn, watching whooami run around...*

  15. whooami
    Member
    Posted 5 years ago #

    thanks for the bump, and the wasted post. I spose I could respectfully ask that if you have nothing to add pertinent to the thread, such as " i can reproduce this" or "i cannot reproduce this" that you ignore it, right?

    There are other people here that might benefit from your undeserved attempt at humor. I, on the other hand, do not.

  16. Chris_K
    Member
    Posted 5 years ago #

    You have this in trac?

  17. whooami
    Member
    Posted 5 years ago #

    yes, though I doubt its gone unoticed by the devs. Its also exists in my 1.5.3 install, so its not exactly new.

  18. whooami
    Member
    Posted 5 years ago #

    the fix for this is actually fairly simple, after trying a ton of things I discovered that simply disallowing html-ized links within comments via kses.php does the trick. You comment out those first few lines that handle <a stuff

    After doing that, it appears that links added like that are parsed properly.

    That said, those that dont know this and might allow html-ized links within comments (the default 2.03 install does allow them) might not realize it or even see it until they validate, if they even bother. Looking at the page, you cannot tell it's broke.

  19. Yosemite
    Member
    Posted 5 years ago #

    This is a support forum, if you want a thread to be treated by your own standards you'll likely end up getting frustrated. Or even ticked off!

  20. whooami
    Member
    Posted 5 years ago #

    "This is a support forum"

    Then why reply like you did? Perhaps you're the one that needs to be reminded of that.

    *sits back munching on popcorn, watching whooami run around...*
    That looks more like an attempt to increase your post count than to provide any kind of support, be it good support or bad support.

    Just a note yosemite, you dont get a cute avatar here when you reach 10,000 posts.

  21. Chris_K
    Member
    Posted 5 years ago #

    Civility gone. Topic closed. Take it to emails and flame each other crispy if you like.

Topic Closed

This topic has been closed to new replies.

About this Topic