HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //proc/self/root/usr/lib/python3.6/site-packages/gyp/__pycache__/xml_fix.cpython-36.opt-1.pyc
3

��S]u�@s4dZddlZddd�Zddd�ZGd	d
�d
e�ZdS)
z�Applies a fix to CR LF TAB handling in xml.dom.

Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
Working around this: http://bugs.python.org/issue5752
TODO(bradnelson): Consider dropping this when we drop XP support.
�NFcCsV|jdd�jdd�}|jdd�jdd�}|rH|jd	d
�jdd�jd
d�}|j|�dS)zWrites datachars to writer.�&z&amp;�<z&lt;�"z&quot;�>z&gt;�
z&#xD;�
z&#xA;�	z&#x9;N)�replace�write)�writer�data�	is_attrib�r�/usr/lib/python3.6/xml_fix.py�_Replacement_write_datasr�c	Cs�|j|d|j�|j�}t|j��}x8|D]0}|jd|�t|||jdd�|jd�q.W|jr�|jd|�x"|jD]}|j|||||�q~W|jd||j|f�n|jd|�dS)	Nrz %s="T)r
rz>%sz	%s</%s>%sz/>%s)	r
ZtagNameZ_get_attributes�sorted�keysr�valueZ
childNodes�writexml)	�selfr�indentZ	addindentZnewlZattrsZa_namesZa_nameZnoderrr�_Replacement_writexmls
rc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�XmlFixz7Object to manage temporary patching of xml.dom.minidom.cCs4tjjj|_tjjjj|_ttjj_ttjjj_dS)N)	�xml�dom�minidom�_write_data�
write_data�Elementrrr)rrrr�__init__5s
zXmlFix.__init__cCs*|jr&|jtjj_|jtjjj_d|_dS)N)rrrrrrr)rrrr�Cleanup=szXmlFix.CleanupcCs|j�dS)N)r!)rrrr�__del__CszXmlFix.__del__N)�__name__�
__module__�__qualname__�__doc__r r!r"rrrrr2sr)F)rrr)r&Zxml.dom.minidomrrr�objectrrrrr�<module>
s