Skip to content

Commit

Permalink
MDL-72299 mod_lti: fix html escaping when reposting cross site posts
Browse files Browse the repository at this point in the history
  • Loading branch information
snake authored and Jenkins committed Jul 6, 2022
1 parent 2f0c3f4 commit b327def
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mod/lti/classes/output/repost_crosssite_page.php
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions mod/lti/templates/repost_crosssite.mustache
Expand Up @@ -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>
Expand Down

0 comments on commit b327def

Please sign in to comment.