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

Using HTML text in handlebars fields doesn't compile properly #9

Closed
robertmausser opened this issue Jan 9, 2024 · 3 comments · Fixed by #10
Closed

Using HTML text in handlebars fields doesn't compile properly #9

robertmausser opened this issue Jan 9, 2024 · 3 comments · Fixed by #10
Assignees
Labels
bug Something isn't working released

Comments

@robertmausser
Copy link

robertmausser commented Jan 9, 2024

Subject of the issue/enhancement/features

When using html (< b >, < q > etc) in instruction text, it doesn't compile properly in the notify popup. It shows the instead of an actual quotation.

Your environment

  • Adapt 5
  • All browers
  • All OSes

Steps to reproduce

Use any html scripting in the instruciton text area.

Expected behaviour

HTML should render properly

Actual behaviour

HTML scripting shows up in notify body text.

Screenshots (if you can)

https://snipboard.io/aZFSk4.jpg

@oliverfoster
Copy link
Member

oliverfoster commented Jan 10, 2024

Curious.

title: Handlebars.compile(this.config.title)(data),
body: Handlebars.compile(this.config.body)(data)

You can see here that it does convert handlebars to html.

The example.json however is not formatted correctly at line:

"body": "{{#if instruction}}{{instruction}}{{else}}Please complete the question and then select Submit.{{/if}}"

Which should be triple curly braced:

"body": "{{#if instruction}}{{{instruction}}}{{else}}Please complete the question and then select Submit.{{/if}}"

@oliverfoster oliverfoster moved this from New to Needs Reviewing in adapt_framework: The TODO Board Jan 10, 2024
@oliverfoster oliverfoster self-assigned this Jan 10, 2024
@oliverfoster oliverfoster added the bug Something isn't working label Jan 10, 2024
@github-project-automation github-project-automation bot moved this from Needs Reviewing to Recently Released in adapt_framework: The TODO Board Jan 16, 2024
github-actions bot pushed a commit that referenced this issue Jan 16, 2024
## [2.0.3](v2.0.2...v2.0.3) (2024-01-16)

### Fix

* Updated defaults to curly brace (fixes #9) ([06af6e4](06af6e4)), closes [#9](#9)
* Updated defaults to triple curly braces (fixes #9) ([f1ae3f9](f1ae3f9)), closes [#9](#9)
Copy link

🎉 This issue has been resolved in version 2.0.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@oliverfoster
Copy link
Member

did that fix it? @robertmausser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants