salomon1184 / rietveld

Automatically exported from code.google.com/p/rietveld
Apache License 2.0
0 stars 0 forks source link

code with form feeds causes problems in side-by-side diff #214

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Find a file where someone has put form feeds in the code (usually between 
functions)
2. Make a change in that file far enough from a form feed that the diff context 
doesn't contain it.
3. View side-by-side diffs of your change.
4. Click "expand all skipped lines"

What is the expected output? What do you see instead?

Expect it to work, instead it says "A 500 occurred"

An ExpatError is raised at the line in codereview/views.py:

 "dom = ElementTree.parse(StringIO('<div>%s</div>' % "".join(response_rows)))"

The actual exception is:

ExpatError: not well-formed (invalid token): line 489, column 61

*** If you are a Google employee please say so or mail me (Guido van
Rossum) directly. ***

I am a Google employee.

Please provide any additional information below.

I submitted an issue to codereview.appspot.com with a fix for this: 
http://codereview.appspot.com/1892053/show

Original issue reported on code.google.com by mcgu...@google.com on 10 Aug 2010 at 5:16

GoogleCodeExporter commented 9 years ago

Original comment by albrecht.andi on 6 Apr 2012 at 7:12