Parser bug
See the link above and/or the attached screenshot.
The second example is converted correctly by Parsoid, but the first is still broken:
http://parsoid.wmflabs.org/_rt/pt/Project:P%C3%A1gina_de_testes/1?oldid=32235099
Version: unspecified
Severity: normal
URL: https://pt.wikipedia.org/wiki/Project:P%C3%A1gina_de_testes/1?oldid=32235034&uselang=en
Attached: