New issue
Advanced search Search tips
Starred by 3 users

Issue metadata

Status: ChangeUnderReview
Owner: ----



Sign in to add a comment
link

Issue 412: apostrophe displayed incorrectly in comments

Reported by erik.ang...@gmail.com, Jan 22 2010

Issue description

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
Screenshot4_expanded_bad.png
4.7 KB View Download
Screenshot6_collapsed2_ok.png
4.8 KB View Download
Screenshot2_draft_bad.png
5.3 KB View Download
Screenshot5_entering2_ok.png
2.8 KB View Download
Screenshot3_collapesd_ok.png
3.0 KB View Download
Screenshot7_expanded2_bad.png
6.8 KB View Download

Comment 1 by sop@google.com, Jan 22 2010

Labels: Milestone-Next
Status: Accepted

Comment 2 by sop@google.com, Jan 27 2010

Labels: -Milestone-Next
Status: CannotReproduce
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.

Comment 3 by erik.ang...@gmail.com, Jan 27 2010

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?

Comment 4 by daniel.l...@packetfront.com, Jan 27 2010

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.

Comment 5 by daniel.l...@packetfront.com, 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 sop@google.com, 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 matt...@unsolvable.org, Oct 14 2015

Submitted a documentation change as https://gerrit-review.googlesource.com/71520

Comment 8 by david.pu...@sonymobile.com, Jan 7 2016

Status: ChangeUnderReview

Comment 9 by matt...@unsolvable.org, Jan 7 2016

Submitted revised documentation change as https://gerrit-review.googlesource.com/#/c/73690/

Comment 10 by logan@google.com, Aug 17 2016

Project Member
Labels: Priority-3

Comment 11 Deleted

Sign in to add a comment