Remove html tags / replace <br> etc with its html style (Create a break) from api response

You need to clear the image code from unnecessary characters.

Bad code

<img src = \ "https: //donegalnews.com/wp-content/uploads/2019/06/Donegal-fans-660x430.jpg \" alt = \ "\" width = \ "660 \" height = \ " 430 \ "class = \" size-website-image wp-image-66613 \ "srcset = \" https://donegalnews.com/wp-content/uploads/2019/06/Donegal-fans-660x430.jpg 660w, https://donegalnews.com/wp-content/uploads/2019/06/Donegal-fans-400x260.jpg 400w \ "sizes = \" (max-width: 660px) 100vw, 660px \ "/>

Good code

<img src = "URL" alt = "alternate text">

And how would I do that? Is it a simply if contains replace with nothing?

I would love to be able to display the images.

You will first clear the image display code and then it will appear in the text.

Okay. And does that display the image or just fix the text. thanks

It seems that the web viewer no longer works. It just broke? I think before it wasn’t web viewer and just the label.

WebViewer is different from system browsers. Not everything will work in it, which will work in system browsers. But your code does not display pictures, because you have a “dirty” code. It needs to be made pure html code.

And by changing \ to nothing it should work?

Yes it should work. To check, use some kind of html editor.

Still getting nothing in the web viewer. I think i was getting data before but i do not know why I get no input now.

Insert your plain text here https://html-online.com/editor/. Pictures in the text are shown?

No, only when I clean it up. But in the app itself, the web viewer no longer shows the html :confused:

Doesn’t work on Androyd?

no. Let me share my code.

https://x.thunkable.com/copy/d149b9176aad48c02120276957393314

It is on the “Full Article” page. The description is plain html code.

The Posts api link is: https://donegalnews.com/wp-json/wp/v2/posts/?categories_exclude=8367&per_page=10&page=1

And the media api is already set for you in blocks.

Again. You need to clear the code of characters that do not allow displaying html correctly. As I understand it, the text you receive changes. Therefore, you need to throw out all these \" \&quot; \n and other dirt.

Do you understand what needs to be done? You must first clear the text, then check it at https://html-online.com/editor/ and if everything is fine, then paste the text into WebViewe after that. Otherwise you will always have problems.

Okay. and when you say \ " &quot; \n
do you mean them separately like this:

\
"
&quot;
\n

and remove things like the html code for apostrophes and speech marks?

Thanks again

Yes

\" - "
&quot; - "
\n - empty string (delete \n)

I tried deleting them three things but no luck. Is there anywhere that i can find a full list of dirt to delete? Or do you have a list of the items.

Thanks

I have no such list. Dirt is created with escape characters. It is necessary to replace \/ on /

so if contains \/ replace with /
?