diff --git a/qsgen2 b/qsgen2 index 4f05a03..afe7d39 100755 --- a/qsgen2 +++ b/qsgen2 @@ -797,70 +797,58 @@ function _cleanup() { } function _html() { - local content="${1}" local debug=false if ${debug}; then _msg debug "_html: Converting QStags in content"; fi - # Convert QStags to HTML using Perl, excluding specific patterns - local html_content=$(echo "$content" | perl -0777 -pe ' - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?/gi; - s/(?/gi; - s/(?/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(?/gi; - s/(?\n/gi; - s/(? "
\\n", + "#BD" => "", "#EBD" => "\\n", + "#I" => "", "#EI" => "\\n", + "#P" => "

", "#EP" => "

\\n", + "#H1" => "

", "#EH1" => "

\\n", + "#H2" => "

", "#EH2" => "

\\n", + "#H3" => "

", "#EH3" => "

\\n", + "#H4" => "

", "#EH4" => "

\\n", + "#H5" => "
", "#EH5" => "
\\n", + "#H6" => "
", "#EH6" => "
\\n", + "#STRONG" => "", "#ESTRONG" => "\\n", + "#EM" => "", "#EEM" => "\\n", + "#DV" => "
", "#EDV" => "
\\n", + "#SPN" => "", "#ESPN" => "\\n", + "#UL" => "\\n", + "#OL" => "
    ", "#EOL" => "
\\n", + "#LI" => "
  • ", "#ELI" => "
  • \\n", + "#U" => "", "#EU" => "\\n", + "#TBL" => "", "#ETBL" => "
    \\n", + "#TR" => "", "#ETR" => "\\n", + "#TD" => "", "#ETD" => "\\n", + "#TH" => "", "#ETH" => "\\n", + "#ART" => "
    ", "#EART" => "
    \\n", + "#SEC" => "
    ", "#ESEC" => "
    \\n", + "#ASIDE" => "\\n", + "#NAV" => "\\n", + "#BTN" => "\\n", + "#SEL" => "\\n", + "#OPT" => "\\n", + "#LT" => "<", "#GT" => ">", "#NUM" => "#" + ); + } + while (my ($key, $value) = each %qstags) { + $key = quotemeta($key); # Escape special characters in QStags + s/(?