diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php
index c0f8ee2b6..3a233e958 100644
--- a/classes/display/HTMLDisplayHandler.php
+++ b/classes/display/HTMLDisplayHandler.php
@@ -261,7 +261,7 @@ class HTMLDisplayHandler
$pattern = '/(action)=(["\'])(["\'])/s';
$output = preg_replace($pattern, '$1=$2' . \RX_BASEURL . '$3', $output);
- $pattern = '/(action|src|href)=(["\'])\.\/([^"\']*)(["\'])/s';
+ $pattern = '/(action|poster|src|href)=(["\'])\.\/([^"\']*)(["\'])/s';
$output = preg_replace($pattern, '$1=$2' . \RX_BASEURL . '$3$4', $output);
$pattern = '/src=(["\'])((?:files\/(?:attach|cache|faceOff|member_extra_info|thumbnails)|addons|common|(?:m\.)?layouts|modules|widgets|widgetstyle)\/[^"\']+)(["\'])/s';
diff --git a/classes/module/ModuleObject.class.php b/classes/module/ModuleObject.class.php
index eb5e3f299..a203bf9aa 100644
--- a/classes/module/ModuleObject.class.php
+++ b/classes/module/ModuleObject.class.php
@@ -601,13 +601,21 @@ class ModuleObject extends BaseObject
if ($type === 'P')
{
$layout_srl = $config->layout_srl ?? 0;
+ if ($layout_srl == -1)
+ {
+ $layout_srl = LayoutAdminModel::getInstance()->getSiteDefaultLayout('P');
+ }
+
if ($layout_srl > 0)
{
$layout_info = LayoutModel::getInstance()->getLayout($layout_srl);
if($layout_info)
{
- $this->module_info->layout_srl = $layout_srl;
$this->setLayoutPath($layout_info->path);
+ if ($config->layout_srl > 0)
+ {
+ $this->module_info->layout_srl = $layout_srl;
+ }
}
}
}
@@ -627,11 +635,17 @@ class ModuleObject extends BaseObject
$layout_srl = LayoutAdminModel::getInstance()->getSiteDefaultLayout('M');
}
- $layout_info = LayoutModel::getInstance()->getLayout($layout_srl);
- if($layout_info)
+ if ($layout_srl > 0)
{
- $this->module_info->mlayout_srl = $layout_srl;
- $this->setLayoutPath($layout_info->path);
+ $layout_info = LayoutModel::getInstance()->getLayout($layout_srl);
+ if($layout_info)
+ {
+ $this->setLayoutPath($layout_info->path);
+ if ($config->mlayout_srl > 0)
+ {
+ $this->module_info->mlayout_srl = $layout_srl;
+ }
+ }
}
}
diff --git a/common/framework/filters/HTMLFilter.php b/common/framework/filters/HTMLFilter.php
index a64e3d757..8833bafc7 100644
--- a/common/framework/filters/HTMLFilter.php
+++ b/common/framework/filters/HTMLFilter.php
@@ -353,6 +353,8 @@ class HTMLFilter
// Support editor components and widgets.
$def->addAttribute('img', 'data-file-srl', 'Number');
+ $def->addAttribute('video', 'data-file-srl', 'Number');
+ $def->addAttribute('audio', 'data-file-srl', 'Number');
$def->addAttribute('img', 'editor_component', 'Text');
$def->addAttribute('div', 'editor_component', 'Text');
$def->addAttribute('img', 'rx_encoded_properties', 'Text');
diff --git a/common/framework/parsers/template/TemplateParser_v2.php b/common/framework/parsers/template/TemplateParser_v2.php
index 12593e223..be1861810 100644
--- a/common/framework/parsers/template/TemplateParser_v2.php
+++ b/common/framework/parsers/template/TemplateParser_v2.php
@@ -285,8 +285,15 @@ class TemplateParser_v2
*/
protected function _convertVerbatimSections(string $content): string
{
- $content = preg_replace_callback('#(@verbatim)\b(.+?)(@endverbatim)\b#s', function($match) {
- return preg_replace(['#(? '{$1}',
+ '#(? '@{{',
+ '#(? '@@$1',
+ '#\$#' => '$',
+ ];
+
+ $content = preg_replace_callback('#(@verbatim)\b(.+?)(@endverbatim)\b#s', function($match) use($conversions) {
+ return preg_replace(array_keys($conversions), array_values($conversions), $match[2]);
}, $content);
return $content;
}
diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js
index 5adc8e2b1..c69bd0f4f 100644
--- a/common/js/xml_handler.js
+++ b/common/js/xml_handler.js
@@ -380,7 +380,7 @@
form = $(form);
// Get success and error callback functions.
if (typeof callback_success === 'undefined') {
- callback_success = form.data('callback-success');
+ callback_success = form.data('callbackSuccess');
if (callback_success && window[callback_success] && $.isFunction(window[callback_success])) {
callback_success = window[callback_success];
} else {
@@ -395,7 +395,7 @@
}
}
if (typeof callback_error === 'undefined') {
- callback_error = form.data('callback-error');
+ callback_error = form.data('callbackError');
if (callback_error && window[callback_error] && $.isFunction(window[callback_error])) {
callback_error = window[callback_error];
} else {
diff --git a/modules/admin/tpl/config_advanced.html b/modules/admin/tpl/config_advanced.html
index 5fbf95ea2..3378ea501 100644
--- a/modules/admin/tpl/config_advanced.html
+++ b/modules/admin/tpl/config_advanced.html
@@ -179,7 +179,7 @@
diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html
index c83c8ef2e..3d47c552f 100644
--- a/modules/board/tpl/board_insert.html
+++ b/modules/board/tpl/board_insert.html
@@ -78,21 +78,21 @@
@@ -143,21 +143,21 @@
@@ -243,7 +243,7 @@
skip_bottom_list_for_olddoc === 'Y'" />
{$lang->skip_bottom_list_for_olddoc}
-
{$lang->unit_day}
+
{$lang->unit_day}
- {$lang->unit_sec}
- {$lang->unit_write_count}
+ {$lang->unit_sec}
+ {$lang->unit_write_count}
{$lang->cmd_interval_help}
diff --git a/modules/tag/tag.model.php b/modules/tag/tag.model.php
index 3c738330a..8cc4a4ef5 100644
--- a/modules/tag/tag.model.php
+++ b/modules/tag/tag.model.php
@@ -103,8 +103,8 @@ class TagModel extends Tag
$args->module_srl = $obj->module_srl;
}
- $args->list_count = $obj->list_count;
- $args->count = $obj->sort_index;
+ $args->list_count = $obj->list_count ?? null;
+ $args->count = $obj->sort_index ?? null;
$output = executeQueryArray('tag.getTagList', $args);
if(!$output->toBool()) return $output;
diff --git a/tests/unit/framework/filters/HTMLFilterTest.php b/tests/unit/framework/filters/HTMLFilterTest.php
index 32fdf5208..79c18a9b5 100644
--- a/tests/unit/framework/filters/HTMLFilterTest.php
+++ b/tests/unit/framework/filters/HTMLFilterTest.php
@@ -273,6 +273,14 @@ class HTMLFilterTest extends \Codeception\Test\Unit
$target = '
';
$this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
+ $source = '';
+ $target = '';
+ $this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
+
+ $source = '';
+ $target = '';
+ $this->assertEquals($target, Rhymix\Framework\Filters\HTMLFilter::clean($source));
+
// Other data-* attribute
$source = 'Hello World
';
$target = 'Hello World
';
diff --git a/tests/unit/framework/parsers/TemplateParserV2Test.php b/tests/unit/framework/parsers/TemplateParserV2Test.php
index 72bcda4ee..5ea0a40f9 100644
--- a/tests/unit/framework/parsers/TemplateParserV2Test.php
+++ b/tests/unit/framework/parsers/TemplateParserV2Test.php
@@ -1015,6 +1015,7 @@ class TemplateParserV2Test extends \Codeception\Test\Unit
'@verbatim',
'@if (true)',
'{{ $foobar }}
',
+ '{$foobar}
',
'@endif',
'@endverbatim',
]);
@@ -1022,6 +1023,7 @@ class TemplateParserV2Test extends \Codeception\Test\Unit
'',
'@if (true)',
'{{ $foobar }}
',
+ '{$foobar}
',
'@endif',
'',
]);