Skip to content

Commit 707ffdc

Browse files
committed
fix: prevent XSS — escape setting data for javascript code
1 parent a4a3876 commit 707ffdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/pages/home.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div id="layers"></div>
1111
<?php
1212
if ($this->homeTitle):
13-
echo " <script>document.title = '".$this->homeTitle."';</script>\n";
13+
echo " <script>document.title = '".addslashes($this->homeTitle)."';</script>\n";
1414
endif;
1515

1616
if (!empty($this->featuredBox['altHomeLogo'])):

0 commit comments

Comments
 (0)