Skip to content

Commit

Permalink
Escape HTML markup in transformation wrapper
Browse files Browse the repository at this point in the history
...in case content type is html.

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Jul 13, 2016
1 parent 8f3ee9f commit 09a427b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion transformation_wrapper.php
Expand Up @@ -112,7 +112,11 @@
PMA_downloadHeader($cn, $mime_type);

if (! isset($resize)) {
echo $row[$transform_key];
if (stripos($mime_type, 'html') === false) {
echo $row[$transform_key];
} else {
echo htmlspecialchars($row[$transform_key]);
}
} else {
// if image_*__inline.inc.php finds that we can resize,
// it sets $resize to jpeg or png
Expand Down

0 comments on commit 09a427b

Please sign in to comment.