@@ 561-566 (lines=6) @@ | ||
558 | */ |
|
559 | function _elgg_get_display_query($string) { |
|
560 | //encode <,>,&, quotes and characters above 127 |
|
561 | if (function_exists('mb_convert_encoding')) { |
|
562 | $display_query = mb_convert_encoding($string, 'HTML-ENTITIES', 'UTF-8'); |
|
563 | } else { |
|
564 | // if no mbstring extension, we just strip characters |
|
565 | $display_query = preg_replace("/[^\x01-\x7F]/", "", $string); |
|
566 | } |
|
567 | return htmlspecialchars($display_query, ENT_QUOTES, 'UTF-8', false); |
|
568 | } |
|
569 |
@@ 23-28 (lines=6) @@ | ||
20 | ||
21 | // @todo - create function for sanitization of strings for display in 1.8 |
|
22 | // encode <,>,&, quotes and characters above 127 |
|
23 | if (function_exists('mb_convert_encoding')) { |
|
24 | $display_query = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8'); |
|
25 | } else { |
|
26 | // if no mbstring extension, we just strip characters |
|
27 | $display_query = preg_replace("/[^\x01-\x7F]/", "", $value); |
|
28 | } |
|
29 | ||
30 | // render placeholder separately so it will double-encode if needed |
|
31 | $placeholder = htmlspecialchars(elgg_echo('search'), ENT_QUOTES, 'UTF-8'); |
@@ 27-32 (lines=6) @@ | ||
24 | ||
25 | // @todo - create function for sanitization of strings for display in 1.8 |
|
26 | // encode <,>,&, quotes and characters above 127 |
|
27 | if (function_exists('mb_convert_encoding')) { |
|
28 | $display_query = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8'); |
|
29 | } else { |
|
30 | // if no mbstring extension, we just strip characters |
|
31 | $display_query = preg_replace("/[^\x01-\x7F]/", "", $value); |
|
32 | } |
|
33 | ||
34 | // render placeholder separately so it will double-encode if needed |
|
35 | $placeholder = htmlspecialchars(elgg_echo('search'), ENT_QUOTES, 'UTF-8'); |
@@ 27-32 (lines=6) @@ | ||
24 | ||
25 | // @todo - create function for sanitization of strings for display in 1.8 |
|
26 | // encode <,>,&, quotes and characters above 127 |
|
27 | if (function_exists('mb_convert_encoding')) { |
|
28 | $display_query = mb_convert_encoding($value, 'HTML-ENTITIES', 'UTF-8'); |
|
29 | } else { |
|
30 | // if no mbstring extension, we just strip characters |
|
31 | $display_query = preg_replace("/[^\x01-\x7F]/", "", $value); |
|
32 | } |
|
33 | ||
34 | // render placeholder separately so it will double-encode if needed |
|
35 | $placeholder = htmlspecialchars(elgg_echo('search'), ENT_QUOTES, 'UTF-8'); |