4619: diff-comments can return wrong size of html content

Tab10id
4617

What version are you running?

3.0.1

What's the URL of the page containing the problem?

...../r/42/_fragments/diff-comments/123,234,345/?allow_expansion=1&123445345

What steps will reproduce the problem?

  1. have diff with unicode content
  2. make comment for fragment with unicode text
  3. get js error on ...../r/42/ for all fragments after fragment with unicode content

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

doesn't matter

What operating system are you using? What browser?

doesn't matter

Please provide any additional information below.

html payload size return bytes not a symbol count
https://github.com/reviewboard/reviewboard/blob/d41ea146f5152792961a8e00e08df4b80cf14334/reviewboard/reviews/views.py#L1430

fixed by change len(html) to len(html.decode('utf-8'))

Tab10id
#1 Tab10id

sorry it duplicate #4617