mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
修复标签属性不支持-的问题
This commit is contained in:
@@ -645,7 +645,7 @@ class Template
|
||||
*/
|
||||
public function parseAttr($str, $name = null)
|
||||
{
|
||||
$regex = '/\s+(?>(?<name>\w+)\s*)=(?>\s*)([\"\'])(?<value>(?:(?!\\2).)*)\\2/is';
|
||||
$regex = '/\s+(?>(?<name>[\w-]+)\s*)=(?>\s*)([\"\'])(?<value>(?:(?!\\2).)*)\\2/is';
|
||||
$array = [];
|
||||
if (preg_match_all($regex, $str, $matches, PREG_SET_ORDER)) {
|
||||
foreach ($matches as $match) {
|
||||
|
||||
@@ -257,7 +257,7 @@ EOF;
|
||||
$_GET['action'] = 'action';
|
||||
$_POST['action'] = 'action';
|
||||
$_COOKIE['name'] = 'name';
|
||||
\think\Session::set('action', ['name' => 'name']);
|
||||
$_SESSION['action'] = ['name' => 'name'];
|
||||
define('SITE_NAME', 'site_name');
|
||||
|
||||
$content = <<<EOF
|
||||
|
||||
Reference in New Issue
Block a user