Skip to content

Resolve "Error 500 due to encoding issues when when attempting to access issues API"

What does this MR do?

Parsing/outputting a language specifier with a unicode character could cause the 500 error. For example, using

```日
some code
```

would cause the problem. Since the output stream used by the commonmarker renderer already forces the stream to utf8 (https://github.com/gjtorikian/commonmarker/blob/a922188df5f08851ed096f89359fbfa53fedb4aa/lib/commonmarker/renderer.rb#L9), use the out function to output the language specifier.

In addition, we also output the sourcepos (which only outputs anything when the SOURCEPOS option is used) like the commonmarker renderer does.

What are the relevant issue numbers?

Closes #51271 (closed)

Does this MR meet the acceptance criteria?

Edited by Brett Walker

Merge request reports