@@ 727-734 (lines=8) @@ | ||
724 | * |
|
725 | * @return string encoded string |
|
726 | */ |
|
727 | public static function encodeHtml($uString) |
|
728 | { |
|
729 | return str_replace( |
|
730 | ["&", "\"", "<", ">"], |
|
731 | ["&", """, "<", ">"], |
|
732 | $uString |
|
733 | ); |
|
734 | } |
|
735 | ||
736 | /** |
|
737 | * Decodes encoded html characters |
|
@@ 743-750 (lines=8) @@ | ||
740 | * |
|
741 | * @return string decoded string |
|
742 | */ |
|
743 | public static function decodeHtml($uString) |
|
744 | { |
|
745 | return str_replace( |
|
746 | ["&", """, "<", ">"], |
|
747 | ["&", "\"", "<", ">"], |
|
748 | $uString |
|
749 | ); |
|
750 | } |
|
751 | ||
752 | /** |
|
753 | * Escapes special html characters |