Skip to content

Commit e9258b9

Browse files
oprypinadamant-pwn
authored andcommitted
Safely interpolate the page title into the "report issue" button
* Currently it is possible that the interpolation escapes the confines of the quotes * Also in a future version of MkDocs, values will become escaped by default, so this value will become incorrect under the current approach
1 parent 941d6b1 commit e9258b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/overrides/partials/content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script type="text/javascript">
22
window.onload = function() {
33
const newIssueURL = "https://github.com/cp-algorithms/cp-algorithms/issues/new";
4-
const issueTitle = `Problem on article "{{page.title}}"`;
4+
const issueTitle = "Problem on article " + {{page.title | tojson }};
55
const issueBody = `
66
**Article:** [{{page.title}}](${window.location.href})
77

0 commit comments

Comments
 (0)