Page MenuHomePhabricator

a lone "0" in a <syntaxhighlight> tag disappears
Closed, ResolvedPublic

Description

Author: org.wikimedia.bugzilla

Description:
When the only non-whitespace character in a <syntaxhighlight> tag is a "0", it disappears

<syntaxhighlight lang="text">
0
</syntaxhighlight>


Version: unspecified
Severity: normal
URL: https://sourceforge.net/tracker/?func=detail&aid=3562020&group_id=114997&atid=670231

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:09 AM
bzimport set Reference to bz39643.

Sounds like the empty() function is being used. which considers "0" to be empty.

I agree we need this patch to be in upstream to avoid facing this issue once again. That is a really minor issue which we can wait to get fixed.

Apparently upstream is still active. Maybe contact http://sourceforge.net/users/benbe directly and ask him to include the fix in the next release? Apparently he is going to release a new version soon.

Oh and maybe you want to attach the unified diff directly in the sourceforge bug report. That will be easier for upstream to merge it in.

Wow, that's a really inviting bugtracking system they have at SF these days.. No wonder people are flocking to github in droves.

I can only add comments to dereckson's report. Can't upload patches, can't report a new issue.

I will add it as soon as we agree on what patch to send. Please review my inline comments on Gerrit about coherence between one test with ===, the other test with empty().

I've got upstream commit for GeSHi so I can commit it

I have verified and merged the change, please have it upstreamed :)

(In reply to comment #10)

I've got upstream commit for GeSHi so I can commit it

Bump.

Actually, https://test.wikipedia.org/wiki/Bug_39643 looks fixed to me. So presumably this was fixed at some point?

Poor Yorick: can you confirm?

As a summary:

The upstream bug is http://sourceforge.net/p/geshi/bugs/215/

We have a hack with https://gerrit.wikimedia.org/r/21473

Sam updated Geshi to v1.0.8.11 https://gerrit.wikimedia.org/r/#/c/22862/

The issue is still in upstream version. Hence we keep this bug opened until upstream has merged our patch and fixed bug 215 properly.

It seems this is still not submitted upstream.
@Reedy: you've mentioned you have upstream commit access. Can you commit the patch there?

(In reply to se4598 from comment #15)

It seems this is still not submitted upstream.
@Reedy: you've mentioned you have upstream commit access. Can you commit the
patch there?

I had upstream for SVN, but they're now at github... https://github.com/GeSHi/

Change 176479 had a related patch set uploaded (by TheDJ):
(bug 39643) Allow "0" as the content of <syntaxhighlight>

https://gerrit.wikimedia.org/r/176479

Patch-For-Review

Change 176479 had a related patch set uploaded (by Krinkle):
Allow "0" as the content of <syntaxhighlight>

https://gerrit.wikimedia.org/r/176479

Patch-For-Review

Change 176479 merged by jenkins-bot:
Allow "0" as the content of <syntaxhighlight>

https://gerrit.wikimedia.org/r/176479

Krinkle changed the task status from Open to Stalled.Jan 5 2015, 12:56 PM
Krinkle removed a project: Patch-For-Review.
Krinkle set Security to None.
Legoktm subscribed.

This is fixed in Pygments, the new library used for syntax highlighting. See T85794: Convert SyntaxHighlight_Geshi from Geshi to Pygments (was: Don't register 250+ modules) for more details.

papertrail: The geshi issue is also merge upstream now, though not yet released: https://github.com/GeSHi/geshi-1.0/pull/35