Skip to content

Commit d95fe9b

Browse files
committed
Use htmlentities() instead of htmlspecialchars() to escape redirect data
1 parent 690e055 commit d95fe9b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Omnipay/Common/Message/AbstractResponse.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public function getRedirectResponse()
7777
foreach ($this->getRedirectData() as $key => $value) {
7878
$hiddenFields .= sprintf(
7979
'<input type="hidden" name="%1$s" value="%2$s" />',
80-
htmlspecialchars($key, ENT_QUOTES, 'UTF-8'),
81-
htmlspecialchars($value, ENT_QUOTES, 'UTF-8')
80+
htmlentities($key, ENT_QUOTES, 'UTF-8', false),
81+
htmlentities($value, ENT_QUOTES, 'UTF-8', false)
8282
)."\n";
8383
}
8484

@@ -97,7 +97,7 @@ public function getRedirectResponse()
9797
</form>
9898
</body>
9999
</html>';
100-
$output = sprintf($output, htmlspecialchars($this->getRedirectUrl(), ENT_QUOTES, 'UTF-8'), $hiddenFields);
100+
$output = sprintf($output, htmlentities($this->getRedirectUrl(), ENT_QUOTES, 'UTF-8', false), $hiddenFields);
101101

102102
return HttpResponse::create($output);
103103
}

0 commit comments

Comments
 (0)