Permalink
Browse files

Changed replacement logic for quotes (") as some versions of Micro$oft's

(so called) browser are buggy and sometimes ignore <p> tags.
  • Loading branch information...
1 parent 160e811 commit 299665b64400333999e098fa16481faeb4db342e thepurpleblob committed Sep 18, 2003
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/wiki.php
View
7 lib/wiki.php
@@ -231,10 +231,15 @@ function line_replace( $line ) {
$line = $this->do_replace( $line, "-", "del" );
$line = $this->do_replace_sub( $line, "~", "sub" );
$line = $this->do_replace_sub( $line, "\^", "sup" );
- $line = $this->do_replace( $line, "\"", "q" );
+ // $line = $this->do_replace( $line, "\"", "q" );
// $line = $this->do_replace( $line, "'", "q" );
$line = $this->do_replace( $line, "%", "code" );
$line = $this->do_replace( $line, "@", "cite" );
+
+ // replace quotes
+ $regex = '(^| |[(.,])\"([^\"]*)\"([^[:alnum:]]|$)';
+ $replace = '\\1&#8220;\\2&#8221;\\3';
+ $line = eregi_replace( $regex, $replace, $line );
// convert urls into proper link with optional link text URL(text)
$line = eregi_replace("([[:space:]]|^)([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])\(([^)]+)\)",

0 comments on commit 299665b

Please sign in to comment.