[Scummvm-git-logs] scummvm-web master -> 9f87c5277e7bdeb4e40b22371e4a8a2acbc9c76c

Thunderforge noreply at scummvm.org
Sat Mar 5 21:06:32 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .

Summary:
9f87c5277e WEB: Using htmlspecialchars() for caption replacement


Commit: 9f87c5277e7bdeb4e40b22371e4a8a2acbc9c76c
    https://github.com/scummvm/scummvm-web/commit/9f87c5277e7bdeb4e40b22371e4a8a2acbc9c76c
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2022-03-05T15:05:40-06:00

Commit Message:
WEB: Using htmlspecialchars() for caption replacement

Changed paths:
    include/OrmObjects/Screenshot.php


diff --git a/include/OrmObjects/Screenshot.php b/include/OrmObjects/Screenshot.php
index 90fed3aa..9c4a88f0 100644
--- a/include/OrmObjects/Screenshot.php
+++ b/include/OrmObjects/Screenshot.php
@@ -67,8 +67,8 @@ class Screenshot extends BaseScreenshot
 
     public function getCaption()
     {
-        // Escape quotes in the name, such as for `Spy Fox in "Dry Cereal"`
-        $name = str_replace("\"", """, $this->getGame()->getName());
+        // Escape quotes and such in the name, such as for `Spy Fox in "Dry Cereal"`
+        $name = htmlspecialchars($this->getGame()->getName());
         $extras = [];
         if ($this->getVariant()) {
             $extras[] = $this->getVariant();




More information about the Scummvm-git-logs mailing list