summaryrefslogtreecommitdiff
path: root/app/helpers.php
diff options
context:
space:
mode:
authorhorus2020-03-24 17:18:39 +0100
committerhorus2020-03-24 17:18:39 +0100
commit74e73666e5f79fe5862bc9cd2c8d244004c381b4 (patch)
treea062e461d0be935993161ca07a8b0f8cddf2f911 /app/helpers.php
parentd68ed7e017f5a6bedb78c46af88dbc9cb7e881d7 (diff)
downloadsenpai-74e73666e5f79fe5862bc9cd2c8d244004c381b4.tar.gz
Integrate chart.js to display anime stats.
Diffstat (limited to 'app/helpers.php')
-rw-r--r--app/helpers.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers.php b/app/helpers.php
new file mode 100644
index 0000000..bac4f0e
--- /dev/null
+++ b/app/helpers.php
@@ -0,0 +1,12 @@
+<?php
+
+function replaceSpecialChars($string) {
+ $string = str_replace("&lt;i&gt;", "<i>", $string);
+ $string = str_replace("&lt;/i&gt;", "</i>", $string);
+ $string = str_replace("&lt;b&gt;", "<b>", $string);
+ $string = str_replace("&lt;/b&gt;", "</b>", $string);
+ $string = str_replace("&lt;br&gt;", "<br>", $string);
+ $string = str_replace("%%br%%", "<br>", $string);
+
+ return $string;
+}