Skip to content

Conversation

@drgrice1
Copy link
Member

First, if an answer is a checkbox answer with multiple parts checked, then the ⍮ character is not handled. This needs the same processing as is done on the past answers page for this.

Second, the essay answers can not be put into a Mojo::Collection and joined with <br> tags. The result of that is a Mojo::ByteStream which means that it is not escaped. That was the original point since the <br> tags cannot be escaped. However, the answers must be escaped so that answers like <script>alert('xss attack')</script> are not executed. So a for loop similar to that used for the checkbox answers must be used. Note that these answers were also wrapped in a redundant <div> tag with the same class as the containing <div> that is still there, and that was removed.

Third, there was a dangling end </div> tag for formula answers that was removed.

First, if an answer is a checkbox answer with multiple parts checked,
then the `&#9070;` character is not handled.  This needs the same
processing as is done on the past answers page for this.

Second, the essay answers can not be put into a `Mojo::Collection` and
joined with `<br>` tags.  The result of that is a `Mojo::ByteStream`
which means that it is not escaped.  That was the original point since
the `<br>` tags cannot be escaped.  However, the answers must be escaped
so that answers like `<script>alert('xss attack')</script>` are not
executed.  So a for loop similar to that used for the checkbox answers
must be used.  Note that these answers were also wrapped in a redundant
`<div>` tag with the same class as the containing `<div>` that is still
there, and that was removed.

Third, there was a dangling end `</div>` tag for formula answers that
was removed.
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

Successfully merging this pull request may close these issues.

1 participant