MDL-72299 mod_lti: fix html escaping when reposting cross site posts

This commit is contained in:
Jake Dallimore
2022-07-06 05:25:29 +02:00
committed by Jenkins
parent 2f0c3f4f7d
commit b327defe5d
2 changed files with 3 additions and 3 deletions
@@ -56,7 +56,7 @@ class repost_crosssite_page implements renderable, templatable {
*/
public function __construct(string $url, array $post) {
$this->params = array_map(function($k) use ($post) {
return ["key" => $k, "value" => str_replace("\"", """, $post[$k])];
return ["key" => $k, "value" => $post[$k]];
}, array_keys($post));
$this->url = $url;
}
+2 -2
View File
@@ -37,9 +37,9 @@
}
}}
<form action="{{{url}}}" method="POST" id="autopostme">
<form action="{{url}}" method="POST" id="autopostme">
{{#params}}
<input type="hidden" name="{{{key}}}" value="{{{value}}}">
<input type="hidden" name="{{key}}" value="{{value}}">
{{/params}}
<input type="hidden" name="repost" value="true">
</form>