Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special characters not supported in the playground #6

Open
johnnymast opened this issue Aug 14, 2021 · 2 comments
Open

Special characters not supported in the playground #6

johnnymast opened this issue Aug 14, 2021 · 2 comments

Comments

@johnnymast
Copy link

johnnymast commented Aug 14, 2021

Hi Noah,

I tried the special character tests in the playground and it seems the following special chars are not supported at least in the output.

\n (works on https://www.rivescript.com/try)
\/

@kirsle
Copy link
Member

kirsle commented Aug 14, 2021

👍 Good catch; in the playground site the "\n" is translated to a literal line feed, but for an HTML output display, this has little tangible effect on the rendered output. For an HTML output the calling code should replace "\n" with "<br>" which it seems the Try Online page does but the playground doesn't.

I'm not sure it's a RiveScript bug though and not a bot implementation bug. For example, in the classic instant messenger bot days (with AOL, MSN, and Yahoo), a \n in a message shows as a line feed in MSN and Yahoo but under AOL, which had HTML-based messages, the \n would need to be deliberately replaced by a <br> tag in order to come out correctly there as well. Definitely the Playground site should handle this, though, since it has an HTML display for the output!

It looks like the \\ and \/ escape codes aren't handled by the JS, Python, or Go versions of RiveScript though which could be considered a bug in their implementations if the Working Draft said these should work.

@johnnymast
Copy link
Author

with these characters now supported on the php version we are now on point 50 of 68 of the working draft,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants