PyukiWiki CVS Commit
pyuki****@lists*****
2012年 3月 20日 (火) 19:47:19 JST
Index: PyukiWiki-Devel/lib/wiki.cgi diff -u PyukiWiki-Devel/lib/wiki.cgi:1.748 PyukiWiki-Devel/lib/wiki.cgi:1.749 --- PyukiWiki-Devel/lib/wiki.cgi:1.748 Tue Mar 20 19:39:52 2012 +++ PyukiWiki-Devel/lib/wiki.cgi Tue Mar 20 19:47:19 2012 @@ -1,6 +1,6 @@ ###################################################################### # wiki.cgi - This is PyukiWiki, yet another Wiki clone. -# $Id: wiki.cgi,v 1.748 2012/03/20 10:39:52 papu Exp $ +# $Id: wiki.cgi,v 1.749 2012/03/20 10:47:19 papu Exp $ # # "PyukiWiki" ver 0.2.0-p3-dev2 $$ # Copyright (C) 2004-2012 Nekyo @@ -172,7 +172,7 @@ $::embedded_name = '(\#.+?)'; # インライン型プラグイン # comment -$::embedded_inline='&(?:([^(;{]+)(?:[()\s?]*?)\s?\{\s?([^&}]*?)\s?\}|([^(;{]+)|([^(;{]+)\s?\(\s?([^)]*?)\s?\)|([^(;{]+)\s?\(\s?([^)]*?)\s?\)\s?\{\s?([^&}]*?)\s?\});'; +$::embedded_inline='&(?:([^(;{]+)(?:[()\s?]*?)\s?\{\s?([^&}]*?)\s?\}|([^(;{]+)|([^(;{]+)\s?\(\s?([^)]*?)\s?\)|([^(;{]+)\s?\(\s?([^)]*?)\s?\)\s?\{\s?([^&}]*?)\s?\});'; ############################## # comment # InfoBasの項目名 # comment @@ -2838,7 +2838,7 @@ $line =~ s|^//.*||g; # Comment # comment # Comment # debug # comment $line =~ s|\s//\s\#.*$||g; -# $line = &htmlspecialchars($line); + $line = &htmlspecialchars($line); # $line=~s!$::_inline!<$::_inline{$1}>$2</$::_inline{$1}>!go; # comment @@ -2896,8 +2896,6 @@ $line =~ s|\[\#(.*)\]|<a class="anchor_super" id="$1" href="#$1" title="$1">$::_symbol_anchor</a>|g; - $line = &htmlspecialchars($line); - # 顔文字 # comment if ($::usefacemark == 1) { $line=~s!($::_facemark)!<img src="$::image_url/face/$::_facemark{$1}" alt="@{[htmlspecialchars($1,1)]}" />!go; @@ -5489,19 +5487,15 @@ sub htmlspecialchars { my($s,$flg)=@_; -# return $s if($s!~/([<>"&])/); + return $s if($s!~/([<>"&])/); - $s=~s/&(\w{1,16});/\r$1;/g; $s=~s/([<>"&])/$::_htmlspecial{$1}/g; - $s=~s/\r(\w{1,16});/&$1;/g; + return $s if($flg eq 1); + # 顔文字、SGML実体参照を戻す # comment + $s=~s/&($::_sgmlescape);/&$1;/ig; + # 10進、16進実態参照を戻す # comment + $s=~s/&#([0-9A-Fa-fXx]+)?;/&#$1;/g; return $s; - -# return $s if($flg eq 1); # comment -# # 顔文字、SGML実体参照を戻す # comment # comment -# $s=~s/&($::_sgmlescape);/&$1;/ig; # comment -# # 10進、16進実態参照を戻す # comment # comment -# $s=~s/&#([0-9A-Fa-fXx]+)?;/&#$1;/g; # comment -# return $s; # comment } =lang ja