Commit b42e2b67 authored by Steven Wittens's avatar Steven Wittens
Browse files

- Make the auto-linebreak filter also ignore the contents of <script>.

    This makes it easier to use JavaScript (e.g. Google Adsense) inside blocks.
parent 755da4bc
...@@ -956,7 +956,7 @@ function _filter_autop($text) { ...@@ -956,7 +956,7 @@ function _filter_autop($text) {
if ($i % 2) { if ($i % 2) {
// Opening or closing tag? // Opening or closing tag?
$open = ($chunk{1} != '/'); $open = ($chunk{1} != '/');
list(, $tag) = split('[< ]', $chunk); list($tag) = split('[ >]', substr($chunk, 2 - $open), 2);
if (!$ignore) { if (!$ignore) {
if ($open) { if ($open) {
$ignore = true; $ignore = true;
......
...@@ -956,7 +956,7 @@ function _filter_autop($text) { ...@@ -956,7 +956,7 @@ function _filter_autop($text) {
if ($i % 2) { if ($i % 2) {
// Opening or closing tag? // Opening or closing tag?
$open = ($chunk{1} != '/'); $open = ($chunk{1} != '/');
list(, $tag) = split('[< ]', $chunk); list($tag) = split('[ >]', substr($chunk, 2 - $open), 2);
if (!$ignore) { if (!$ignore) {
if ($open) { if ($open) {
$ignore = true; $ignore = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment