New issue
Advanced search Search tips
Starred by 3 users

Issue metadata

Status: ChangeUnderReview
Owner: ----

Sign in to add a comment

Issue 412: apostrophe displayed incorrectly in comments

Reported by, Jan 22 2010

Issue description

Affected Version: gerrit  
Environment: Mozilla 3.5.7 (both on linux and win xp, also tried IE and
Chrome on win xp)

What steps will reproduce the problem?
1. Enter a comment or cover message containing an apostrophe (').
2. In none-expanded mode it looks fine.
3. When the comment is expanded all apostrophes are displayed with 
html escape encoding: & # 3 9 ; (added spaces here just to make it 
doesn't get translated somewhere).

What is the expected output? What do you see instead?
  This should be an apostrophe: '
  This should be an apostrophe: '

Please provide any additional information below.

Added a number of screen shots (ending in _ok or _bad depending on
if it is a place where the apostrophe work or not).
6.8 KB View Download
4.7 KB View Download
4.8 KB View Download
5.3 KB View Download
2.8 KB View Download
3.0 KB View Download
6.8 KB View Download

Comment 1 by, Jan 22 2010

Labels: Milestone-Next
Status: Accepted

Comment 2 by, Jan 27 2010

Labels: -Milestone-Next
Status: CannotReproduce
I can't reproduce this.

Firefox/Linux 3.0.17
Firefox/Mac 3.5.6

All render this correctly.

Its true that we convert ' to ' when we render the text, but '
should be getting evaluated by the browser as an entity.  If its not
it is a bug in the browser.

I've lately seen a spate of bugs in Firefox 3.5.x, where stuff just is
broken horribly, and its got nothing to do with Gerrit Code Review.  E.g.
someone reported Firefix 3.5.x had F3 mapped to the same keyboard binding
as the letter "r".  A serious WTF, given that we never map the function
keys in Gerrit Code Review specifically so that they can be used to activate
the browser's native features.

Comment 3 by, Jan 27 2010

Strange. When I go to another gerrit site, e.g:
I don't see this problem (and I use the same browser) so that makes me think has to
do with something on the server-side. What version of gerrit are you running on Do you have some installation somewhere I could
try browsing to see if I see the same problem?

Comment 4 by, Jan 27 2010

I can reproduce this with:

Google Chrome XP
IE8 8.0.6001.18702/Windows XP

This is with an English Windows XP but Swedish locale (if that would matter)

But as Erik says, I can too only reproduce this on our local installation and neither on 
Androids or OpenAFS installations.

Comment 5 by, Jan 27 2010

All right. I found the issue in our local installation.

I have a comment link for linking bug numbers into our local bugzilla installation.
And that one is catching the escaped apostrophe. But weirdly only on expanded comments.
I'll readjust the regexp to filter out this case.

Sorry for the noise.

Comment 6 by, Jan 27 2010

Yes, the commentlink patterns are applied on the HTML form
of the message in question.  Which means it needs to assume
the data has been escaped, so " needs to be matched as "
or < as &lt;, and ' as &#39;.

I guess our documentation on commentlink isn't clear enough
that this is how it works, and what the escape codes are.

Comment 7 by, Oct 14 2015

Submitted a documentation change as

Comment 8 by, Jan 7 2016

Status: ChangeUnderReview

Comment 9 by, Jan 7 2016

Submitted revised documentation change as

Comment 10 by, Aug 17 2016

Project Member
Labels: Priority-3

Comment 11 Deleted

Sign in to add a comment