How to create a category with '&' in title using REST API.
I am trying to create categories using REST API.
I am having issue when the category title has '&' like <title>Andaman & Nicobar Islands</title>.
If I use & in request XML, i am getting parsing error and if i use '&', i am getting Response code 400.
Any idea to fix this issue? Thanks in Advance.
|
One answer
Did you try to replace '&' with the corresponding entity? That would be &
Comments
Srinivasarao A
commented Jun 03 '14, 2:17 p.m.
I need to add title like <title>Andaman & Nicobar</title>. The character i need is & itself, not '&'.
Simon Washbrook
commented Jun 04 '14, 3:47 a.m.
Hi Srinivasarao, What Piotr is trying to say is that the ampersand character is a special character so you need to replace it with a HTML entity, which is a special encoding. You will notice that HTML entities all start with the ampersand character. See the link "http://www.w3schools.com/html/html_entities.asp" and search for ampersand.
Piotr Aniola
commented Jun 04 '14, 10:47 a.m.
Ok, I just noticed that when I typed the ampersand entity, the forum parsed it and rendered the actual ampersand instead. This obviously made my answer confusing, sorry.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
If you create such category via the web UI and the GET it using REST API, what is the RDF/XML representation of the title?
Also, out of curiosity, how exactly did you create a category using REST API?