Skip to content

Commit

Permalink
Merge pull request #2115 from cjee21/HTML
Browse files Browse the repository at this point in the history
Escape HTML strings
  • Loading branch information
JeromeMartinez authored Sep 30, 2024
2 parents 00d9658 + f0de8d9 commit d0d9af7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/MediaInfo/MediaInfo_Inform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,10 @@ Ztring MediaInfo_Internal::Inform (stream_t StreamKind, size_t StreamPos, bool I
Retour+=__T(" <tr>\n <td class=\"Prefix\">");
Retour+=Prefix+Nom.TrimLeft();
Retour+=__T(" :</td>\n <td>");
Valeur.FindAndReplace(__T("&"), __T("&amp;"), 0, Ztring_Recursive);
Valeur.FindAndReplace(__T("<"), __T("&lt;"), 0, Ztring_Recursive);
Valeur.FindAndReplace(__T(">"), __T("&gt;"), 0, Ztring_Recursive);
Valeur.FindAndReplace(__T(" "), __T(" &nbsp;"), 0, Ztring_Recursive);
Retour+=Valeur;
Retour+=__T("</td>\n </tr>");
}
Expand Down

0 comments on commit d0d9af7

Please sign in to comment.