[education/rkward/kf5] scripts: Fix extraction of text nodes containing entities

Thomas Friedrichsmeier null at kde.org
Wed Apr 10 16:12:08 BST 2024


Git commit b5de5b3b3f4c53c8f83c12869969e50bd70f2d8d by Thomas Friedrichsmeier.
Committed on 01/04/2024 at 13:48.
Pushed by tfry into branch 'kf5'.

Fix extraction of text nodes containing entities

M  +1    -1    scripts/update_plugin_messages.py

https://invent.kde.org/education/rkward/-/commit/b5de5b3b3f4c53c8f83c12869969e50bd70f2d8d

diff --git a/scripts/update_plugin_messages.py b/scripts/update_plugin_messages.py
index a21a60c4b..48a6aa44c 100755
--- a/scripts/update_plugin_messages.py
+++ b/scripts/update_plugin_messages.py
@@ -170,7 +170,7 @@ def getFullText (element):
       rc.append ("\n\n" + getFullText (cn) + "\n\n")
     elif cn.nodeType != cn.COMMENT_NODE:
       rc.append(stripLineDummy (cn.toxml ()))
-  return ''.join (rc).strip ().replace ("&", "&")
+  return ''.join (rc).strip ()       # NOTE: .replace ("&", "&") not needed: gets passed through HTML.unesacpe in quote()
 
 # get the content of all text nodes inside this node (does not include xml tags)
 def getText (node):



More information about the rkward-tracker mailing list