[Git][qa/jenkins.debian.net][master] rdn stats: use html.escape

Holger Levsen (@holger) gitlab at salsa.debian.org
Wed Aug 27 08:38:58 BST 2025



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
1b0602b7 by Jochen Sprickerhof at 2025-08-27T09:38:46+02:00
rdn stats: use html.escape

(cherry picked from commit 6cfeb3338e9fc5d31272e8d975065fc2142f3aba)
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/rebuilderd_stats.py


Changes:

=====================================
bin/rebuilderd_stats.py
=====================================
@@ -10,6 +10,7 @@
 from argparse import ArgumentParser
 from datetime import datetime
 from hashlib import file_digest
+from html import escape
 from os import path
 from pathlib import Path
 from pickle import dump, load
@@ -287,7 +288,7 @@ def output(outfile, arch, db_size, total, messages_packages, size_sort, api):
             print(f'<a href="https://tests.reproducible-builds.org/debian/rb-pkg/trixie/{ci_arch}/{pkg["src"]}.html">🔬</a>', end='', file=outfile)
             if rn_bug := rn_bugs.get(pkg["src"]):
                 if comments := rn_bug.get("comments"):
-                    comments = comments.replace("\n", "
").replace("<", "<").replace(">", ">")
+                    comments = escape(comments).replace("\n", "
")
                     print(f'<span title="{comments}">🗈</span>', end='', file=outfile)
                 for bug in rn_bug.get("bugs", []):
                     print(f'<a style="color: #FF0000;" href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug={bug}">#</a>', end='', file=outfile)



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/1b0602b7ec4cd853da71b52f77700ffb7eb71efe

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/1b0602b7ec4cd853da71b52f77700ffb7eb71efe
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20250827/ac4df03d/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list