]> git.mxchange.org Git - friendica.git/blobdiff - library/mcefixes/plugins.bbcode.editor_plugin_src.js
Frio: remove header(location) in default.php
[friendica.git] / library / mcefixes / plugins.bbcode.editor_plugin_src.js
old mode 100755 (executable)
new mode 100644 (file)
index 183f2bc..f94fbc5
 \r
                        function rep(re, str) {\r
 \r
+\r
+s = s.replace(re,str);\r
+\r
                                //modify code to keep stuff intact within [code][/code] blocks\r
                                //Waitman Gobble NO WARRANTY\r
 \r
+/* This doesn't seem to work well with\r
+[code]line1\r
+line2[/code]\r
+commenting out for now\r
+*/\r
 \r
+/*\r
                                var o = new Array();\r
                                var x = s.split("[code]");\r
                                var i = 0;\r
@@ -71,7 +80,7 @@
                                }\r
 \r
                                s = o.join("[code]");\r
-\r
+*/\r
                        };\r
 \r
 \r
                        rep(/<blockquote[^>]*>/gi,"[quote]");\r
                        rep(/<\/blockquote>/gi,"[/quote]");\r
                        rep(/<hr \/>/gi,"[hr]");\r
-                       rep(/<br \/>/gi,"\n\n");\r
-                       rep(/<br\/>/gi,"\n\n");\r
+                       rep(/<br (.*?)\/>/gi,"\n");\r
+                       rep(/<br\/>/gi,"\n");\r
                        rep(/<br>/gi,"\n");\r
                        rep(/<p>/gi,"");\r
                        rep(/<\/p>/gi,"\n");\r
 \r
                         function rep(re, str) {\r
 \r
+\r
                                 //modify code to keep stuff intact within [code][/code] blocks\r
                                 //Waitman Gobble NO WARRANTY\r
 \r