| Conditions | 3 |
| Paths | 4 |
| Total Lines | 29 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | function inte() |
||
| 30 | { |
||
| 31 | $xss = $this->security->xss(); |
||
| 32 | $sanitise = $this->security->sanitise(); |
||
| 33 | |||
| 34 | |||
| 35 | echo "\nXSS"; |
||
| 36 | $unCleanString = 'Visit my website http://www.doajob.org?redirect=https://www.google.com'; |
||
| 37 | |||
| 38 | |||
| 39 | echo "\nUnclean String: " . $unCleanString; |
||
| 40 | $cleanString = $xss->clean($unCleanString); |
||
| 41 | echo "\nXSS Cleaned String: " . $cleanString; |
||
| 42 | $cleanString = $xss->cleanUrl($unCleanString); |
||
| 43 | echo "\nXSS Cleaned Url: " . $cleanString; |
||
| 44 | echo "\n"; |
||
| 45 | |||
| 46 | echo "\nSanitised Url: " . $sanitise->removeUrl($unCleanString); |
||
| 47 | if ($sanitise->isSanitised()) { |
||
| 48 | echo "\n1"; |
||
| 49 | } |
||
| 50 | |||
| 51 | echo "\nString without a Url: " . $sanitise->removeUrl("Rob WIlson"); |
||
| 52 | if ($sanitise->isSanitised()) { |
||
| 53 | echo "\n1"; |
||
| 54 | } |
||
| 55 | |||
| 56 | |||
| 57 | } |
||
| 58 | |||
| 60 |
Classes in PHP are usually named in CamelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.
Thus the name database provider becomes
DatabaseProvider.