summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/lib/Roundcube/rcube.php')
-rw-r--r--program/lib/Roundcube/rcube.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index 1ce6241c8..c3aa8ffa5 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -894,6 +894,30 @@ class rcube
/**
+ * Quote a given string.
+ * Shortcut function for rcube_utils::rep_specialchars_output()
+ *
+ * @return string HTML-quoted string
+ */
+ public static function Q($str, $mode = 'strict', $newlines = true)
+ {
+ return rcube_utils::rep_specialchars_output($str, 'html', $mode, $newlines);
+ }
+
+
+ /**
+ * Quote a given string for javascript output.
+ * Shortcut function for rcube_utils::rep_specialchars_output()
+ *
+ * @return string JS-quoted string
+ */
+ public static function JQ($str)
+ {
+ return rcube_utils::rep_specialchars_output($str, 'js');
+ }
+
+
+ /**
* Construct shell command, execute it and return output as string.
* Keywords {keyword} are replaced with arguments
*