[Announce] node-red-contrib-html-entities

Hi all,
After several days of messing around in a flow and a growing number of function nodes filled with regex replacements of HTML entities by the character they represented I decided it was time to replace it by a node instead. I had previously searched around, but didn't manage to find anything, but there were suitable libraries on NPM available. So I created a wrapper node around the he html entities package.

Today after several iterations of code it reached the stage where it became ready for public usage. So here I present node-red-contrib-html-entities:

One of the practical use cases that I'm working with is parsing (partial) HTML files, then sending forward fragments from that snippet. As these are all 3rd party controlled systems, I have no control over how the text that's coming in looks like. Even better, the most used website where I ran into this issue has a really wide character range that they allow users to use/post with. Em-dashes and curly quotes were the first characters that ended up in those replacement functions, but accented letters were encoded as well.

Constructive feedback is always welcome :slight_smile:

2 Likes

Hi, looks useful,. Couple of comments, generally we have the name as the last field as its usually optional. And I would have the mode first so it "reads" like a sentence.. Eg. Encode the msg.payload ...

1 Like

Perfect, thanks again Dave. It’s still looking better than I had initially expected. CSS and layouting in general isn’t my strongest suit. Even went as far as put core nodes code on a second screen (my previous job learned me to utilise a single screen when in reality you need 2 or 3, so I hardly use a second screen nowadays).
But after a while you’re so deep in the code you forget the usability or best practices. Your feedback has been very useful :slight_smile: