Issue 412: apostrophe displayed incorrectly in comments
Status:  ChangeUnderReview
Owner: ----
Reported by erik.ang...@gmail.com, Jan 21, 2010
Affected Version: gerrit 2.1.1.1  
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?
Expected:
  This should be an apostrophe: '
Got:
  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).

Screenshot1_entering_ok.png
6.8 KB   View   Download
Screenshot2_draft_bad.png
5.3 KB   View   Download
Screenshot3_collapesd_ok.png
3.0 KB   View   Download
Screenshot4_expanded_bad.png
4.7 KB   View   Download
Screenshot5_entering2_ok.png
2.8 KB   View   Download
Screenshot6_collapsed2_ok.png
4.8 KB   View   Download
Screenshot7_expanded2_bad.png
6.8 KB   View   Download
Jan 22, 2010
#1 sop@google.com
(No comment was entered for this change.)
Status: Accepted
Labels: Milestone-Next
Jan 26, 2010
#2 sop@google.com
I can't reproduce this.

Firefox/Linux 3.0.17
Firefox/Mac 3.5.6
Chrome/Linux 4.0.249.43

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.
Status: CannotReproduce
Labels: -Milestone-Next
Jan 26, 2010
#3 erik.ang...@gmail.com
Strange. When I go to another gerrit site, e.g:
  https://review.source.android.com/
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
review.source.android.com? Do you have some 2.1.1.1 installation somewhere I could
try browsing to see if I see the same problem?

Jan 26, 2010
#4 daniel.l...@packetfront.com
I can reproduce this with:

Google Chrome 4.0.295.0/Windows 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.
Jan 26, 2010
#5 daniel.l...@packetfront.com
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.
Jan 27, 2010
#6 sop@google.com
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.
Oct 14, 2015
#7 matt...@unsolvable.org
Submitted a documentation change as https://gerrit-review.googlesource.com/71520
Jan 6 (3 days ago)
Project Member #8 david.pu...@sonymobile.com
(No comment was entered for this change.)
Status: ChangeUnderReview
Jan 7 (3 days ago)
#9 matt...@unsolvable.org
Submitted revised documentation change as https://gerrit-review.googlesource.com/#/c/73690/