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

Sorry, but I did not understand your question. Removing or replacing something will happen as you programmed in blocks.

The label shows up things like < p > and < /p > and I think for < br > as well. I need it to show it as it would look in html. I am linking to a wordpress blog and the blog of course contains things like this, and the json from the wordpress site sends me this data but i need the label to interpret it or remove it. i would rather it acted like html though.

I understand correctly that you want to keep some tags and remove others? If so, then either make exceptions when searching and replacing tags, or first convert the non-removable tags to unique characters, delete the rest, and finally do the reverse conversion.

I have exceptions for tags that look like […] and speech marks and all that stuff, and I have set them to replace with what they mean, if you get me?

But it is really important that I get the paragraphs as it is a news article that I am dealing with.

Thanks again for your help, i really do appreciate it!

here is an example of the data that i am dealing with.


I need it to show as it would in a html viewer. Thanks

To display this text as in a browser, you need to use WebViewer and the data URI protocol.

An example is shown on the scrHtml screen.

In your example you join the html together. Does this matter? I just have one massive string.

This is my code: image

App description is the text that I have above but it still does nothing. I changed it to URI protocol in the advanced settings.

You can give me your text in txt format, which I can copy, and look at their devices.


The texts vary so here are 3 examples.

Examples.txt (13.5 KB)


I looked at examples. Take the second text example. I added it to the WebViewer and in iOS on Live, paragraphs and characters \ n between them are displayed.

Other texts are also displayed without problems. What is your problem and in what case?

I set that text now as the url and i get nothing

can you share a photo of your code for that, if there is any? Thanks

also i am on android 9, samsung one ui, device is samsung s8

Also does the image show up in the text?

In my example, the data URI is used. If you paste the text in the URL, it does not show anything.

Images are not displayed, because you need to fix the html code for them - everything \" replace on ".

1 Like

ahh okay. I understand now. You joined the data uri thing at the start, then the actual html code that I got.

So is there a way to add images into the html? And here is what I am getting now in web viewer:

Photo links still show, and i get the html tags for things like speech marks and apostrophes.

And thank you for this help. I really do appreciate it!

You need to clear the image code from unnecessary characters.

Bad code

<img src = \ "https: // \" alt = \ "\" width = \ "660 \" height = \ " 430 \ "class = \" size-website-image wp-image-66613 \ "srcset = \" 660w, 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.