summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-04-20 03:01:07 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-04-20 03:01:07 +0000
commitb42e2b6760988c8308858e53ca8460664e0c88c3 (patch)
tree598a3fbb6ed6d46684cfad264b1b1a08fc3e995f /modules
parent755da4bc0e52b8f2ce8a2a470974b6a4a322bc53 (diff)
downloadbrdo-b42e2b6760988c8308858e53ca8460664e0c88c3.tar.gz
brdo-b42e2b6760988c8308858e53ca8460664e0c88c3.tar.bz2
- Make the auto-linebreak filter also ignore the contents of <script>.
This makes it easier to use JavaScript (e.g. Google Adsense) inside blocks.
Diffstat (limited to 'modules')
-rw-r--r--modules/filter.module2
-rw-r--r--modules/filter/filter.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/filter.module b/modules/filter.module
index c77c51351..05d875419 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -956,7 +956,7 @@ function _filter_autop($text) {
if ($i % 2) {
// Opening or closing tag?
$open = ($chunk{1} != '/');
- list(, $tag) = split('[< ]', $chunk);
+ list($tag) = split('[ >]', substr($chunk, 2 - $open), 2);
if (!$ignore) {
if ($open) {
$ignore = true;
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index c77c51351..05d875419 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -956,7 +956,7 @@ function _filter_autop($text) {
if ($i % 2) {
// Opening or closing tag?
$open = ($chunk{1} != '/');
- list(, $tag) = split('[< ]', $chunk);
+ list($tag) = split('[ >]', substr($chunk, 2 - $open), 2);
if (!$ignore) {
if ($open) {
$ignore = true;