diff --git a/renderer.php b/renderer.php
index db03ba75a0e..3ab12aae32c 100644
--- a/renderer.php
+++ b/renderer.php
@@ -97,20 +97,31 @@ public function formulation_and_controls(question_attempt $qa, question_display_
);
// Restore inputnames.
foreach ($question->inputs as $name => $input) {
+ // ISS1752 - The Mathjax filter is mangling the nolink spans if they're between
+ // curly braces so we have to do an extra search.
$questiontext = str_replace(
- "[[InMNEYMWDx:{$name}]]",
+ [
+ "[[InMNEYMWDx:{$name}]]",
+ "<span class=\"nolink\">[[InMNEYMWDx:{$name}]]</span>"
+ ],
"[[input:{$name}]]",
$questiontext
);
$questiontext = str_replace(
- "[[VnMNEYMWDx:{$name}]]",
+ [
+ "[[VnMNEYMWDx:{$name}]]",
+ "<span class=\"nolink\">[[VnMNEYMWDx:{$name}]]</span>"
+ ],
"[[validation:{$name}]]",
$questiontext
);
}
foreach ($question->prts as $index => $prt) {
$questiontext = str_replace(
- "[[GDBBdLBJLg:{$index}]]",
+ [
+ "[[GDBBdLBJLg:{$index}]]",
+ "<span class=\"nolink\">[[GDBBdLBJLg:{$index}]]</span>"
+ ],
"[[feedback:{$index}]]",
$questiontext
);