rivescript-python
rivescript-python copied to clipboard
Unable to reply with complex html
I want the bot to respond with small html bits when needed. But when i give it a few complex tags rivescript throws errors like [ERR: Math couldn't 'div' to value 'undefined' etc... Its json encoded aswell
The <div> tag is used in RiveScript to divide numeric user variables.
I wouldn't recommend using HTML within RiveScript (unless it's returned by an object macro, where no further tags get processed on its output). If you must, use a different block-level tag such as <section> that isn't likely to be used in the future as a RiveScript special tag.
I use html template responses in the router streams. I have to use html though, normal text replies is boring.
I did a search-replace on all <div> tags like, html.replace("div", "dxv").
Then on the client side restore <div>'s again.
If there are more breaks i will do the same with those tags.