I created a feedback for a Select & Order question with this text:

<h3>Correct!</h3>
<p>message.</p>

What I got in the feedback box on the question page was this instead:

 Correct!
<p>message.</p>

I double checked that the question is using the custom input format I created for closedquestions (with no input filters).

Comments

adamdicarlo’s picture

Here's the XML for the question.

<question type="selectorder" duplicates="0"><text><p>Which of these fruit are considered berries? Drag the berries to the right-side box and make sure to place them in alphabetical order.</p>
</text><option id="a"><choice><img src="[attachurl:1]"/> Apple</choice></option><option id="b"><choice><img src="[attachurl:2]"/> Blueberry</choice></option><option id="c"><choice><img src="[attachurl:7]"/> Raspberry</choice></option><option id="d"><choice><img src="[attachurl:4]"/> Strawberry</choice></option><option id="e"><choice><img src="[attachurl:5]"/> Watermelon</choice></option><option id="f"><choice><img src="[attachurl:6]"/> Orange</choice></option><hint mintries="1" maxtries="1">A first hint. Only appears when: Minimum Tries = 1 AND Maximum Tries = 1. That is, it only appears once.</hint><hint mintries="2" maxtries="2">A second hint. Only appears once.</hint><hint mintries="3">A third hint. Appears again and again (no "maxtries" condition is set).</hint><mapping correct="1"><match pattern="^bcd$"/><feedback><h4>Correct!</h4>
<p>Blueberries, raspberries, and strawberries are all berries.</p>
<p>Apples, watermelon and oranges are not berries.</p></feedback></mapping><mapping><match pattern="^(cbd|cdb|dbc|dcb|bdc)$"/><feedback><h3>Almost!</h3>
<p>You've found the berries but you still need to place them in alphabetical order.</p></feedback></mapping><mapping stop="1"><match pattern="^[^b]"/><feedback mintries="3">Blueberry goes first.</feedback></mapping><mapping stop="1"><match pattern="^b[^c]"/><feedback mintries="4"><p>Raspberry goes second.</p></feedback></mapping></question>
jvdkolk’s picture

Confirmed this on http://wmmrc.nl/ for all text-nodes.

Feedback is currently put in HTML 'span'-tags, so it makes sense that all block-level HTML tags (like headers) are filtered out. Is it not possible to use e.g. em, b, strong, etc?

adamdicarlo’s picture

That's pretty weird.

Yeah, it's possible to use those other tags... but it's very unintuitive (especially not being warned that this will happen).

Spans? Why not wrap feedback in divs?

HylkeVDS’s picture

Status: Active » Fixed

I've changed the span's to dev's and added some css to show those feedback div's inline to mimic old behaviour. I've also added H1-H6 to the xml lib so they are not stripped.
So it's fixed in dev :)

adamdicarlo’s picture

Excellent! Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.