HF RL Explorer

Task: Escaping Strings for Use in XML in Python

Task: Escaping Strings for Use in XML in Python: a task in Terminal-Lego-15k (Harbor dataset). When constructing XML documents programmatically in Python, special characters in string data (such as < , , & , " , and ' ) must be properly escaped to produce valid XML. Failure to do so can result in…

The task

When constructing XML documents programmatically in Python, special characters in string data (such as `<`, `>`, `&`, `"`, and `'`) must be properly escaped to produce valid XML. Failure to do so can result in malformed XML or security vulnerabilities (e.g., XML injection).

Part of PrimeIntellect/Terminal-Lego-15k.