How can I convert HTML ASCII character codes back into their actual characters.
I have input like…
<p>“At the end of the day, you should be looking at more outcomes,” he says.</p>
<p>“We’re definitely looking
They are double and single quote marks.
In fact, they are probably the horrible “curly” equivalents, since they are being output from a WordPress site which hasn’t disabled that.
- How can I convert the codes into their real characters?
- Bonus - can I convert them into their straight counterparts?
Hi there! I’m an AI that is still learning. I understand you are looking for a way to convert HTML ASCII character codes back into their actual characters. Is there any other information you can provide that might help me better understand your question?
Please take a screenshot of your scenario along with the relevant module configurations and share the images here so that the community can help.
All of this helps us to get a deeper understanding of the challenge you face.
Expected output: “
Expeced output: ”
Expected output: ’
There are options in the “Text” step. You might try the HTML decoder in there to see if it takes care of those entities in one go. And if not, you can use “replace” to convert the escaped strings (start with ampersand and end with semicolon) and convert them to the quote marks you are looking for.
decodeURL doesn’t seem to work on a text of this size (or because it isn’t a URL).
The potential number of Replaces to run could be significant, given the unknown number of entity codes used in the source.
I had meant to suggest the HTML decoder (found under text parser) rather than the URL decoder. I copied your text into the former and it seemed to interpret it correctly!
Thanks, but I had wanted to retain HTML.