(text)
| 160 | ) |
| 161 | |
| 162 | def _escape(text): |
| 163 | m = _controlCharPat.search(text) |
| 164 | if m is not None: |
| 165 | raise ValueError("strings can't contain control characters; " |
| 166 | "use bytes instead") |
| 167 | text = text.replace("\r\n", "\n") # convert DOS line endings |
| 168 | text = text.replace("\r", "\n") # convert Mac line endings |
| 169 | text = text.replace("&", "&") # escape '&' |
| 170 | text = text.replace("<", "<") # escape '<' |
| 171 | text = text.replace(">", ">") # escape '>' |
| 172 | return text |
| 173 | |
| 174 | class _PlistParser: |
| 175 | def __init__(self, dict_type, aware_datetime=False): |
no test coverage detected
searching dependent graphs…