Closed BYUComputingBootCampTests closed 3 years ago
It looks like liquid has a built in "escape" filter that we could add easily to handle special characters. In my testing so far though, it doesn't seem to work well with double quotes, so I'll check it out and see if there is a workaround.
This PR should resolve the problems. Ping me if you run into other cases that cause issues.
Ooh, that sounds great! And if all of the other special characters work, then the double quotes shouldn't be an issue (it'll be easy to replace it with single quotes instead). Thanks!
With this fix, single and double quotes should work, along with all other special characters.
I've been trying to implement more quiz questions through the Computing Boot Camp, but I keep running into the same problem. It's pretty straightforward. This below is a normal quiz question format for the questions.yml file:
If I replace any of the inputs for "prompt:", "text:", "correct:" or "help:" with any special characters used in HTML, then it won't work and will break the page. For example, look at the following quiz question:
This results in this on the CBC website:
It would be nice if the text inputs for quiz questions could support special characters. Since our website specializes in software and electrical development, alot of the quiz questions are naturally going to want to include these special characters. For example, the quiz question above is one that I am writing, and I can't use it in the site.