adaptlearning / adapt-contrib-instructionError

An extension providing an accessible error for invalid question submissions reiterating the question instructions
GNU General Public License v3.0
0 stars 0 forks source link

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

Closed robertmausser closed 10 months ago

robertmausser commented 10 months ago

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

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 commented 10 months ago

Curious.

https://github.com/adaptlearning/adapt-contrib-instructionError/blob/a486c90d1c24a2c7e8f008973c301240f5a13b04/js/adapt-contrib-instructionError.js#L26-L27

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

The example.json however is not formatted correctly at line: https://github.com/adaptlearning/adapt-contrib-instructionError/blob/a486c90d1c24a2c7e8f008973c301240f5a13b04/example.json#L5 Which should be triple curly braced:

"body": "{{#if instruction}}{{{instruction}}}{{else}}Please complete the question and then select Submit.{{/if}}"
github-actions[bot] commented 10 months ago

:tada: This issue has been resolved in version 2.0.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

oliverfoster commented 10 months ago

did that fix it? @robertmausser