aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-11 00:21:00 -0800
committerfriendica <info@friendica.com>2013-11-11 00:21:00 -0800
commit435e2dae0e9204afd7288c14748e88f680276969 (patch)
tree23b1cbdbd8f2bc42ffc2243a0be95797b63b8ce5 /view/tpl/jot-header.tpl
parent0adf31eef240c8d58ba6fc471892189a69d0696b (diff)
downloadvolse-hubzilla-435e2dae0e9204afd7288c14748e88f680276969.tar.gz
volse-hubzilla-435e2dae0e9204afd7288c14748e88f680276969.tar.bz2
volse-hubzilla-435e2dae0e9204afd7288c14748e88f680276969.zip
display encrypted text inline
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-xview/tpl/jot-header.tpl36
1 files changed, 36 insertions, 0 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 05928bc32..4457a6d52 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -361,6 +361,42 @@ function enableOnUser(){
};
+ function b2h(s) {
+ var y = s;
+ function rep(re, str) {
+ y = y.replace(re,str);
+ };
+
+ rep(/\n/gi,"<br />");
+ rep(/\[b\]/gi,"<strong>");
+ rep(/\[\/b\]/gi,"</strong>");
+ rep(/\[i\]/gi,"<em>");
+ rep(/\[\/i\]/gi,"</em>");
+ rep(/\[u\]/gi,"<u>");
+ rep(/\[\/u\]/gi,"</u>");
+ rep(/\[hr\]/gi,"<hr />");
+ rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
+ rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
+ rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,"<img width=\"$1\" height=\"$2\" src=\"$3\" />");
+ rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
+
+ rep(/\[list\](.*?)\[\/list\]/gi, '<ul class="listbullet" style="list-style-type: circle;">$1</ul>');
+ rep(/\[list=\](.*?)\[\/list\]/gi, '<ul class="listnone" style="list-style-type: none;">$1</ul>');
+ rep(/\[list=1\](.*?)\[\/list\]/gi, '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>');
+ rep(/\[list=i\](.*?)\[\/list\]/gi,'<ul class="listlowerroman" style="list-style-type: lower-roman;">$1</ul>');
+ rep(/\[list=I\](.*?)\[\/list\]/gi, '<ul class="listupperroman" style="list-style-type: upper-roman;">$1</ul>');
+ rep(/\[list=a\](.*?)\[\/list\]/gi, '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$1</ul>');
+ rep(/\[list=A\](.*?)\[\/list\]/gi, '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$1</ul>');
+ rep(/\[li\](.*?)\[\/li\]/gi, '<li>$1</li>');
+ rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<span style=\"color: $1;\">$2</span>");
+ rep(/\[size=(.*?)\](.*?)\[\/size\]/gi,"<span style=\"font-size: $1;\">$2</span>");
+ rep(/\[code\](.*?)\[\/code\]/gi,"<code>$1</code>");
+ rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<blockquote>$1</blockquote>");
+
+ return y;
+ };
+
+
{{$geotag}}
</script>