HTML special characters in issue titles
Added by Emmanuel Bourgerie almost 13 years ago
Hi !
I'm using Redmine via the web interface and the REST API. After having some encoding issues when using the API, I escape special characters before sending the content Redmine.
It also works fine, descriptions are correctly displayed in both web & API.
But it doesn't work for titles : the "éé" string, once converted "éé", gives the screenshot I attached.
I don't know if it's a bug or something I missed, would you take a look please ? :)
Sans titre.png (3.84 KB) Sans titre.png | Escape issue sample |
Replies (5)
RE: HTML special characters in issue titles - Added by Emmanuel Bourgerie almost 13 years ago
After a quick look in the bowels of Redmine, I found this :
subject = h(issue.subject)
So yes, it seems to be a Redmine feature.
RE: HTML special characters in issue titles - Added by Etienne Massip almost 13 years ago
I guess that you're sending XML and that you escaped your XML data as if it were HTML; there is a difference between HTML and XML escaping, you can do the test at http://www.freeformatter.com/string-escaper.html.
RE: HTML special characters in issue titles - Added by Emmanuel Bourgerie almost 13 years ago
Thanks for the tip, but it didn't work at all :(
For the title I now have "éé" but the description seems good.
As far as I understood, there is no specific process when receiving from the REST API. safe_attributes
in the issue model does integrity check, but that's all.
RE: HTML special characters in issue titles - Added by Etienne Massip almost 13 years ago
It worked just fine for me:
Edit: (with trunk version)
RE: HTML special characters in issue titles - Added by Etienne Massip almost 13 years ago
Processing IssuesController#create to xml (for 10.132.21.139 at 2012-03-01 14:27:35) [POST] Parameters: {"issue"=>{"project_id"=>"1", "subject"=>"ééé", "priority_id"=>"6", "description"=>"éàé"}, "controller"=>"issues", "action"=>"create", "format"=>"xml"}