| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 2 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 41 | public function escape($string) |
|
| 18 | { |
||
| 19 | // 'ENT_DISALLOWED' ensures that invalid characters in the given document type are replaced. |
||
| 20 | // Otherwise control characters like a vertical tab "\v" will make the XML document unreadable |
||
| 21 | // by the XML processor |
||
| 22 | // @link https://github.com/box/spout/issues/329 |
||
| 23 | 41 | return htmlspecialchars($string, ENT_NOQUOTES | ENT_DISALLOWED); |
|
| 24 | } |
||
| 25 | |||
| 43 |