From what I gather, from this URL https://yoursite/products.html?id="1" you want the value of the ID. If that is the case, then use the Browser component.
This is for people giving speeches or sermons. While they speak, someone can text or email in questions to an address.
Control Panel loads a GetQuestions page every 15 seconds that goes out to an IMAP box and retrieves any emails or text messages. Then it stores them in the database.
Control Panel then refreshes the database every 5 seconds and lists any new questions that have come in.
But, right now What's up in the database is simply What's up when Wappler outputs it.
So, I thought I could encode it with urlencode() so that with Wappler I can decode it and display it properly.
It’s odd because if I use my own testing file to read the database, it reads What's up as What’s up even without the decode. But, I don’t know why Wappler was reading it as What's up so I just figured I’d encode it to bypass that problem.
when you use {{binding}} or dmx-text it is treated as a string whereas dmx-html treats the value as pure html and interprets it as such hence why ascii characters are converted.
There could be an issue there though… that if you just display HTML that you could inadvertently allow some malicious HTML to come through just an heads up (not sure if Wappler does some checking there though) but that’s probably why the binding is automatically text based.
If you are concerned about malicious code, you can take advantage of the replace function to just replace the single quote ascii in the string but leave it as a string:
Yeah I think what @bpj suggests is a great way to do this. That way you can selectively allow certain ASCII elements through rather than all HTML to avoid some injection.
You can chain multiple .replace() formatters together (you may have occasions where a name has an accent, umlaut, cedilla etc.) but, depending on your requirements, another option is to use dmx-html but use .stripTags() on the value to ensure it doesn’t render with any javascript/iframe etc. that could be malicious. It would then convert all encoded ascii characters but any HTML tags would be removed.