Returns the string with XML-safe special characters.
(string)
| 1157 | } |
| 1158 | |
| 1159 | def xml_encode(string): |
| 1160 | """ Returns the string with XML-safe special characters. |
| 1161 | """ |
| 1162 | string = string.replace("&", "&") |
| 1163 | string = string.replace("<", "<") |
| 1164 | string = string.replace(">", ">") |
| 1165 | string = string.replace("\"",""") |
| 1166 | string = string.replace(SLASH, "/") |
| 1167 | return string |
| 1168 | |
| 1169 | def xml_decode(string): |
| 1170 | """ Returns the string with special characters decoded. |
no outgoing calls
no test coverage detected
searching dependent graphs…