Skip to content

Commit 3319c95

Browse files
committed
Fix bug when using quotes in titles
1 parent 1c076df commit 3319c95

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/templates/Document/Create.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ require("./header.inc.phtml");
5353
<label for="title">Title:</label><br/>
5454
<input type="text" name="title" id="title" tabindex="1" required
5555
autofocus="autofocus" value="<?php echo
56-
htmlspecialchars($this->getContext()->title, ENT_HTML5, "UTF-8");
56+
filter_var($this->getContext()->title, FILTER_SANITIZE_STRING);
5757
?>"/>
5858
</section>
5959
<section>

src/templates/Document/Edit.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ require("./header.inc.phtml");
5858
<label for="title">Title:</label><br/>
5959
<input type="text" name="title" id="title" tabindex="1" required
6060
autofocus="autofocus" value="<?php echo
61-
htmlspecialchars($this->getContext()->title, ENT_HTML5, "UTF-8");
61+
filter_var($this->getContext()->title, FILTER_SANITIZE_STRING);
6262
?>"/>
6363
</section>
6464
<section>

src/templates/News/Create.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ require("./header.inc.phtml");
6363
<label for="title">Title:</label><br/>
6464
<input type="text" name="title" id="title" tabindex="2" required
6565
value="<?php echo
66-
htmlspecialchars($this->getContext()->title, ENT_HTML5, "UTF-8");
66+
filter_var($this->getContext()->title, FILTER_SANITIZE_STRING);
6767
?>"/>
6868
</section>
6969
<section>

src/templates/News/Edit.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ require("./header.inc.phtml");
6868
<label for="title">Title:</label><br/>
6969
<input type="text" name="title" id="title" tabindex="2" required
7070
value="<?php echo
71-
htmlspecialchars($this->getContext()->title, ENT_HTML5, "UTF-8");
71+
filter_var($this->getContext()->title, FILTER_SANITIZE_STRING);
7272
?>"/>
7373
</section>
7474
<section>

0 commit comments

Comments
 (0)