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.
Similar to http://drupal.org/node/224092 but an extra '<' character is appended before the closing HTML tag (i.e. turns into <. The 6.x-1.6 release notes list issue 224092 as resolved but the slightly different problem at hand still persists after upgrading and clearing cache. Attached is a patch that I'm using to remedy this.
Comment | File | Size | Author |
---|---|---|---|
#24 | _glossary_insertlink.txt | 4.83 KB | greenrover33 |
#9 | glossary.txt | 9.43 KB | adzio |
glossary.patch | 524 bytes | adzio |
Comments
Comment #1
adzio CreditAttribution: adzio commentedMeant to say
</a>
turns into<</a>
Comment #2
NancyDruI'm not seeing this after I made a few changes. Can you please try the -dev version this evening and see if you still see it? If you do, please tell me what kind of term indicator you are using.
Comment #3
adzio CreditAttribution: adzio commentedYes, 2008-Oct-03 dev still has the bug I originally reported. My patch above remedies the original problem I saw.
However, I'm seeing a new occurrence of an extra < character now appearing (after we have changed some Glossary settings) - looks like it's now related to using the
<abbr>
tag. I may be able to provide you with some test case data next week if you hit a wall with this issue.Comment #4
NancyDruOkay. It's hard for me to know if it's fixed when I can't reproduce it. And I do test things.
Comment #5
adzio CreditAttribution: adzio commentedNo doubt. Please try the following:
<p><strong>What is Foobar</strong></p>
where Foobar is a Glossary term. What I'm getting is along the lines of:<p><strong>What is <a class="glossary-term" href="/glossary/term/10"><abbr title="(...)">Foobar</abbr></a><</strong></p>
Comment #6
NancyDruHmm, I still don't see it. Is this only happening on short phrases where the term is at the end? Are you using substring substitution? Have you tried it without the
<strong>
?Comment #7
adzio CreditAttribution: adzio commentedThe
<strong>
comes from FCKEditor. Perhaps the conditions to replicate this bug are more complex (more complex nesting of tags or very tag- or term- specific condition).. I am currently unsure if I can use the verbatim HTML that we have on our site as a test case for you for various reasons. In the meantime will be on the lookout for an easy HTML that brings this bug to life, but at this point it is still clearly there.Comment #8
NancyDruAaarrrggghhh! WYSIWYG editors are the bane of module developers' lives. Please turn it off and see if you can recreate the problem.
Comment #9
adzio CreditAttribution: adzio commentedI understand your frustration with WYSIWYG editors (I've had my share of pain with them heh) but we are obligated to provide this functionality for our users. Please find a sample html attached that breaks as specified above after the Glossary filter is applied - please try it and let me know if you are able to reproduce the problem on your side.
When using the html attached, the contents of the first
<h3>...</h3>
are replaced with<h3><b>What is <a class="glossary-term" href="/glossary/term/173"><abbr title="A legal process that involves the sale of a mortgaged property in order to pay the loan of the defaulting borrower. Foreclosure laws are based on the statutes of each state. ">Foreclosure</abbr></a><</b></h3>
The order of filters applied to this content is: URL filter, HTML filter, Line break converter, HTML corrector, Glossary filter.
Comment #10
adzio CreditAttribution: adzio commentedWere you able to reproduce the bug? Note the use of basic HTML tags in the attached content. Changing Status to active.
Comment #11
NancyDruI took a short vacation so I'm still trying to catch up.
Comment #12
adzio CreditAttribution: adzio commentedAny luck?
Comment #13
NancyDruStill catching up. Real Life™ seems to be very hectic lately.
Comment #14
codeknitter CreditAttribution: codeknitter commentedI have run into this problem, and I don't use a WYSIWYG editor on my site. I have the module temporarily turned off, but I'd be happy to turn it on and give you a url if that will help.
In my case, I used G2 before updating glossary, and I'm wondering if that may actually be part of the problem.
Comment #15
michellezeedru CreditAttribution: michellezeedru commentedI am seeing this problem as well. I did not use G2 before (as codeknitter had), but am using FCKeditor. I tried disabling FCKeditor, but the extra > is still showing when Glossary is enabled. It was running without problems, so I'm unsure why it suddenly started adding the extra >. I did do a recent upgrade to a newer version of FCKeditor, and it's possible this problem started after that, but I can't be sure.
Would appreciate your help on this problem. Let me know if there's anything I can do in testing.
Comment #16
adzio CreditAttribution: adzio commentedmziegmann - you may want to clear the cache after you disable FCKeditor to really test whether disabling it would fix it - the content gets cached after the first parse (view).
nancydru - there are now three separate cases of the same problem, would it be possible to dedicate some cycles to analyzing this problem?
Comment #17
webchickNate/quicksketch looked into this and found it only happens when the mbstring extension is not available. That probably explains why it's reproducable in some environments and not others.
To reproduce this on a server *not* having this problem, change the following line in glossary.module:
to:
And in includes/unicode.inc change:
to:
(basically trick it into thinking your server isn't up to par)
Then voila; arrows everywhere! :)
I can confirm that this patch fixes the issue, although I'm not positive it's the correct fix. Worthy of "needs review" at any rate.
Comment #18
webchickAnd fwiw, our glossary settings are:
Match type: Word
Case sensitivity: Case insensitive
Replace matches: All matches
Blocked elements: abbr acronym
Link type: normal
Term indicator: use abbr element
Comment #19
-e-train CreditAttribution: -e-train commentedI have added the patch fix above and it seems to work fine for me as well. thank you...
Comment #20
Dialer3 CreditAttribution: Dialer3 commentedThat patch does not work. Glossary module still adds < to external links in a text. Waiting for solution...
Comment #21
socratesone CreditAttribution: socratesone commentedI've applied the patch, as well. It did not appear to be working at first. I cleared the cache and it seems to work fine.
Comment #22
dkingofpa CreditAttribution: dkingofpa commentedbump
Comment #23
carn1x CreditAttribution: carn1x commentedI'm still having this issue, the patch did not work for me.
The issue only seems to be occurring under special circumstances for me, that is, if the next character after the term is a "<", whether a closing tag wrapping the term, or an open tag unrelated to the term, then another "<" will be added to the output.
EDIT: Ok totally didn't read properly the first time. Installing php-mbstring fixed this issue for me.
Comment #24
greenrover33 CreditAttribution: greenrover33 commentedI have had the same issue.
To solve it i reimplemented the _glossary_insertlink() function.
Open Issue:
I dont understand what for the rtl and ltr stuff should be? Why i have to watch for this here?
My version dosent have this. Do right to left writing people do: [code]some crazy letters[/code]. Or do they have to use normal html (codes) like all other?
Comment #25
mgiffordbump!
Comment #26
NancyDru