Skip to content

Commit

Permalink
修复 自动播放设置失效问题
Browse files Browse the repository at this point in the history
修复 自动播放设置失效问题
修复 解析时   过滤问题
  • Loading branch information
fghrsh committed May 29, 2017
1 parent 0e48f2f commit cf72368
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions function.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ function parseCallback($post, $config) {
$dp["#dp#$i#"] = substr($matches[0][$i], 1, -1);
$out = empty($out) ? self::str_replace_once($matches[0][$i], "#dp#$i#", $post) : $out = self::str_replace_once($matches[0][$i], "#dp#$i#", $out);
} else {
$attr = htmlspecialchars_decode($matches[3][$i]);
$atts = self::shortcode_parse_atts($attr);
$atts = self::shortcode_parse_atts(self::str_replace_nbsp($matches[3][$i]));
if (isset($atts['url'])) {
$data = array('id' => md5($siteurl.$atts['url']));
$data['hotkey'] = isset($atts['hotkey']) ? self::str2bool($atts['hotkey']) : (bool)$config->hotkey;
Expand Down Expand Up @@ -88,6 +87,7 @@ function get_shortcode_regex($tagnames = null) {
')(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*+(?:\\[(?!\\/\\2\\])[^\\[]*+)*+)\\[\\/\\2\\])?)(\\]?)'; }

function is_not_null($val) { return !is_null($val); }
function str2bool($str) { return $str == 'true' ? $str == 'false' ? false : true : $str; }
function str2bool($str) { return $str == 'true' ? true : ($str == 'false' ? false : $str); }
function str_replace_nbsp($str) { return strip_tags(htmlspecialchars_decode(str_replace(' ',' ',$str))); }
function str_replace_once($n, $r, $h) { return ($p = strpos($h, $n)) === false ? $h : substr_replace($h, $r, $p, strlen($n)); }
}
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<adapted>140614</adapted>
<version>1.8</version>
<pubdate>2016-05-30</pubdate>
<modified>2017-05-28</modified>
<modified>2017-05-29</modified>
<price>0</price>
<advanced>
<dependency></dependency>
Expand Down

0 comments on commit cf72368

Please sign in to comment.