@@ -34,14 +34,17 @@ function! s:nr2hex(nr)
3434 return r
3535endfunction
3636
37- function ! s: decodeEntityReference (str)
37+ function ! s: decodeEntityReference (str, ... )
3838 let str = a: str
3939 let str = substitute (str, ' >' , ' >' , ' g' )
4040 let str = substitute (str, ' <' , ' <' , ' g' )
41- " let str = substitute(str, '"', '"', 'g')
42- " let str = substitute(str, ''', "'", 'g')
43- " let str = substitute(str, ' ', ' ', 'g')
44- " let str = substitute(str, '¥', '\¥', 'g')
41+ echomsg get (g: , ' webapi#xml#decodeAsHTML' , 0 )
42+ if get (g: , ' webapi#xml#decodeAsHTML' , 0 )
43+ let str = substitute (str, ' "' , ' "' , ' g' )
44+ let str = substitute (str, ' '' , " '" , ' g' )
45+ let str = substitute (str, ' ' , ' ' , ' g' )
46+ let str = substitute (str, ' ¥' , ' \¥' , ' g' )
47+ endif
4548 let str = substitute (str, ' &#x\([0-9a-fA-F]\+\);' , ' \=s:nr2enc_char("0x".submatch(1))' , ' g' )
4649 let str = substitute (str, ' &#\(\d\+\);' , ' \=s:nr2enc_char(submatch(1))' , ' g' )
4750 let str = substitute (str, ' &' , ' \&' , ' g' )
0 commit comments