mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Treat pattern attribute of form elements as JS context in Template v2
This commit is contained in:
parent
170aab3ca8
commit
dd4d4fe979
2 changed files with 9 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ class TemplateParser_v2
|
|||
}, $content);
|
||||
|
||||
// Inline scripts.
|
||||
$content = preg_replace_callback('#(?<=\s)(href="javascript:|on[a-z]+=")([^"]*?)"#i', function($match) {
|
||||
$content = preg_replace_callback('#(?<=\s)(href="javascript:|pattern="|on[a-z]+=")([^"]*?)"#i', function($match) {
|
||||
return $match[1] . '<?php $this->config->context = \'JS\'; ?>' . $match[2] . '<?php $this->config->context = \'HTML\'; ?>"';
|
||||
}, $content);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue