Moved safe_line_html call after the %plainhtml check so it does not convert essential html characters such as < and > to ampersand form.

This commit is contained in:
kaphula 2020-04-20 23:13:03 +03:00 committed by Tinmarino
parent f9b9b5a768
commit 35af13c1ef

View File

@ -1218,16 +1218,14 @@ function! s:parse_line(line, state) abort
let state.header_ids = a:state.header_ids
let res_lines = []
let line = s:safe_html_line(a:line)
let processed = 0
let line = a:line
if !processed
" allows insertion of plain text to the final html conversion
" for example:
" %plainhtml <div class="mycustomdiv">
" inserts that line to the final html file (without %plainhtml prefix)
" inserts the line above to the final html file (without %plainhtml prefix)
let trigger = '%plainhtml'
if line =~# '^\s*' . trigger
let lines = []
@ -1259,6 +1257,8 @@ function! s:parse_line(line, state) abort
endif
endif
let line = s:safe_html_line(a:line)
" pres
if !processed
let [processed, lines, state.pre] = s:process_tag_pre(line, state.pre)