summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-03-05 20:06:24 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-03-05 20:06:24 +0100
commit98cb8604b50ef15e66c424df8b433f115f05e548 (patch)
tree393f6b51d865cc369f8a051713d97e4e48be6649
parentc173650d14a68c276101ba188fa4bf25175ccc7d (diff)
downloadrpg-98cb8604b50ef15e66c424df8b433f115f05e548.tar.gz
rpg-98cb8604b50ef15e66c424df8b433f115f05e548.tar.bz2
fixed online comment stripping
-rw-r--r--lib/exe/css.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php
index 0a2a5a406..178895e99 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -611,16 +611,11 @@ function css_onelinecomment_cb($matches) {
$out .= substr($line, $i, $len-$i);
break;
}
- if($nexturl === false) {
+ if($nexturl === false || $nextcom < $nexturl) {
// no url anymore, strip comment and be done
$out .= substr($line, $i, $nextcom-$i);
break;
}
- if($nextcom < $nexturl) {
- // that comment comments out the url
- $out .= substr($line, $i, $len-$i);
- break;
- }
// we have an upcoming url
$urlclose = strpos($line, ')', $nexturl);
$out .= substr($line, $i, $urlclose-$i);