Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There seems to be a small bug in the way ampersand sign (&) is handled in external page title. I have an external blog title which has & as html entity (&) and it ended up showing as "&" instead of just "&" as it was supposed to in pingback commented by field. See the screenshot for an example.
Comment | File | Size | Author |
---|---|---|---|
pingback problem.png | 28.77 KB | vesapalmu |
Comments
Comment #1
Freso CreditAttribution: Freso commentedThe 5.x branch is no longer supported. Do you still see this behaviour in Pingback 6.x-1.0?
Comment #2
vesapalmu CreditAttribution: vesapalmu commentedUnfortunately this is only used at D5 site and currently upgrade to D6 is not an option for the site.
Comment #3
funana CreditAttribution: funana commentedsame here.
Comment #4
vesapalmu CreditAttribution: vesapalmu commentedPerhaps you could try to recruit a different maintainer for 5.x branch instead of just not supporting it? There is a ton of 5.x sites still out there for a very long time...
Comment #5
Freso CreditAttribution: Freso commented@wesku: If you provide a patch for 5.x (and 6.x), we'll be happy to commit it. As it is, nobody seems to want to deal with earlier versions of Pingback (understandably - the code's a mess :/), so unless someone steps up, it's not being supported.
Comment #6
andreashaugstrup CreditAttribution: andreashaugstrup commentedWhat Freso said. Neither of us has no interest in maintaining a D5 branch that we will never use. So we will only accept patches for the D6 branch of pingback module. We have no need for a D5 maintainer. Respectfully: It is your job to recruit a D5 branch maintainer. Send him our way and we can talk to him. We do this in our precious spare time and have no wish to spend it on backporting changes to an old Drupal version.
If you wish to backport a bugfix to the D5 branch you can post a D5 patch, but this will only be applied *after* the D6 fix has been applied. There will be no new features in the D5 branch.
Comment #7
vesapalmu CreditAttribution: vesapalmu commentedYou might not have need for D5 maintainer, but there are other people out there that do. I will have a look at the latest version of 6.x module and see if I could take over the 5.x branch for you. I have a client who is using this module on a 5.x site and they will not be upgrading to 6 in near future.
Comment #8
NaheemSays CreditAttribution: NaheemSays commentedThe bug is not exclusive to ampersands as can be seen on a drupal 6 site.
Could this bug be that the site name/title is check_plain()'ed twice?
Comment #9
Wim LeersI think nbz is right. I've got the same problem. Since I don't get that many pingbacks, I'm just editing them manually.
Comment #10
ao2 CreditAttribution: ao2 commentedWhile evaluating the pingback module I also came across this problem.
You can reproduce the problem sending yourself a pingback from this site TestTrack, It has a › character in the title which is enough to trigger the problem. Another test can be done putting three dots in the title (...) which wordpress will convert to a … character.
Do you want even more fun? Put an unescaped < or a > in the post title, now you can't receive the pingback because those charactes make the regex for title fail in pingback module.
Can someone take a look and reproduce those problems?
Thanks, Antonio.
Comment #11
Wim LeersWithout having looked at the code, I'm fairly sure that the reason is that comment titles in Drupal don't allow for HTML entities — by default at least. That's what we'd have to work around.
Comment #12
eikes CreditAttribution: eikes commentedHi,
same here, I get pingbacks from sites with « and » in the title and any other html-entity will (and does) have the same problem.
The problem is this line (251):
$title = check_plain($matchtitle[1]);
my solution is to change this to
$title = strip_tags(html_entity_decode($matchtitle[1]));
so any html tags wil be stripped, which is acceptable because only malicous sites will have tags nested in the title tag and all html entities will remain, which is desireable, because people love to put these kinds of things in their titles :
♥ ♣ » • ← ∴
Comment #13
eikes CreditAttribution: eikes commentedComment #14
Freso CreditAttribution: Freso commented@Eikaa: Could you please provide the fix as a patch?
Comment #15
harmanrainu CreditAttribution: harmanrainu commentedWell i have now only moved my site http://wannagainbig.com/ from wordpress to drupal and i am persisting with same problem please explain the solution as i am a beginner.
Comment #16
ao2 CreditAttribution: ao2 as a volunteer commentedClosing as outdated because drupal 6 is not supported anymore.