the pageforms find sections has a bug with section title has special characters such as "(", ")", "+".
e.g. ===age (10-20)===
as i don't know how can i commit a pull request for it. so i attach my patch file content, thx.
Index: extensions/PageForms/includes/PF_FormPrinter.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- extensions/PageForms/includes/PF_FormPrinter.php (revision ed14ff91f8507fe2dd8e3d4a2baf07ca8eef6117)
+++ extensions/PageForms/includes/PF_FormPrinter.php (date 1582622681838)
@@ -1353,7 +1353,7 @@
$tag_components_next_section = PFUtils::getFormTagComponents( $bracketed_string_next_section );
$tag_title_next_section = trim( $tag_components_next_section[0] );
if ( $tag_title_next_section == 'section' ) {
- if ( preg_match( '/(^={1,6}[ ]*?' . $tag_components_next_section[1] . '[ ]*?={1,6}\s*?$)/m', $existing_page_content, $matches, PREG_OFFSET_CAPTURE ) ) {
+ if ( preg_match( '/(^={1,6}[ ]*?' . preg_quote($tag_components_next_section[1], '/') . '[ ]*?={1,6}\s*?$)/m', $existing_page_content, $matches, PREG_OFFSET_CAPTURE ) ) {
$section_end_loc = $matches[0][1];
}
}