Try using Perl to insert page_content into BODY

This commit is contained in:
Stig-Ørjan Smelror 2024-01-30 08:52:13 +01:00
parent 44c6bb7b8e
commit 988bd0e775

7
qsgen2
View File

@ -337,8 +337,11 @@ function _pages() {
#exit #exit
# Insert page_content into pages_tpl by replacing the BODY tag present there # Insert page_content into pages_tpl by replacing the BODY tag present there
if (${debug}) echo "_pages: Replacing BODY with page_content in pages_tpl" if (${debug}) echo "_pages: Replacing BODY with page_content in pages_tpl using Perl"
pages_tpl=$( echo ${pages_tpl} | sed -e "s|BODY|${page_content}|g" ) # Use Perl for multi-line and special character handling
pages_tpl=$( echo "${pages_tpl}" | perl -pe "s|BODY|${page_content}|gs" )
# pages_tpl=$( echo ${pages_tpl} | sed -e "s|BODY|${page_content}|g" )
#echo ${pages_tpl} #echo ${pages_tpl}
#exit #exit