vier: With IE there are no borders around images anymore
bbcode: Multiple new lines are now reduced
This commit is contained in:
parent
763504f0d5
commit
6f6b1f95c8
2 changed files with 14 additions and 0 deletions
|
@ -310,6 +310,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
||||||
|
|
||||||
// remove some newlines before the general conversion
|
// remove some newlines before the general conversion
|
||||||
$Text = preg_replace("/\s?\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","[share$1]$2[/share]",$Text);
|
$Text = preg_replace("/\s?\[share(.*?)\]\s?(.*?)\s?\[\/share\]\s?/ism","[share$1]$2[/share]",$Text);
|
||||||
|
$Text = preg_replace("/\s?\[quote(.*?)\]\s?(.*?)\s?\[\/quote\]\s?/ism","[quote$1]$2[/quote]",$Text);
|
||||||
|
|
||||||
// when the content is meant exporting to other systems then remove the avatar picture since this doesn't really look good on these systems
|
// when the content is meant exporting to other systems then remove the avatar picture since this doesn't really look good on these systems
|
||||||
if (!$tryoembed)
|
if (!$tryoembed)
|
||||||
|
@ -324,6 +325,15 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
||||||
|
|
||||||
$Text = trim($Text);
|
$Text = trim($Text);
|
||||||
$Text = str_replace("\r\n","\n", $Text);
|
$Text = str_replace("\r\n","\n", $Text);
|
||||||
|
|
||||||
|
// removing multiplicated newlines
|
||||||
|
$search = array("\n\n\n", "\n ", " \n", "[/quote]\n\n", "\n[/quote]");
|
||||||
|
$replace = array("\n\n", "\n", "\n", "[/quote]\n", "[/quote]");
|
||||||
|
do {
|
||||||
|
$oldtext = $Text;
|
||||||
|
$Text = str_replace($search, $replace, $Text);
|
||||||
|
} while ($oldtext != $Text);
|
||||||
|
|
||||||
$Text = str_replace(array("\r","\n"), array('<br />','<br />'), $Text);
|
$Text = str_replace(array("\r","\n"), array('<br />','<br />'), $Text);
|
||||||
|
|
||||||
if($preserve_nl)
|
if($preserve_nl)
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
@import url("css/font-awesome.css") all;
|
@import url("css/font-awesome.css") all;
|
||||||
@import url("css/font2.css") all;
|
@import url("css/font2.css") all;
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ========= */
|
/* ========= */
|
||||||
/* = Admin = */
|
/* = Admin = */
|
||||||
/* ========= */
|
/* ========= */
|
||||||
|
|
Loading…
Reference in a new issue