Remove \ from json output
-
farsian
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
7 years 2 months ago #6316
by farsian
Hi
I want to use jbackend as a API. in the json output of jbackend , there are some backslashes in html output . for example in "content" element of articles . i tried tu use echo json_encode($response, JSON_UNESCAPED_SLASHES) instead of echo json_encode($response) in the /components/com_jbackend/views/request/view.html.php but it hasn't any effect
please help me
Please Log in or Create an account to join the conversation.
-
farsian
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
7 years 2 months ago #6317
by farsian
here is some example of output :
<p style=\"text-align: center;\"><span style=\"color: #993300;\"><strong>This is Mine...</strong></span></p>
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
-
farsian
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
7 years 2 months ago #6333
by farsian
it's from json because these bacslashes doesnt't exist in the database
and please give me a solution because i need that html string to run somewhere else and those "\" dont let that string to run corectly
tnx
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
7 years 2 months ago - 7 years 2 months ago #6338
by admin
I can't give you any solution, because there is no problem here. The JSON output from jBackend content plugin is correct and probably you are just dealing with an "escape" problem with your client.
Last edit: 7 years 2 months ago by admin.
Please Log in or Create an account to join the conversation.
Time to create page: 0.159 seconds