Title casing results in invalid HTML escape sequences
Closed this issue · 2 comments
RubenVerborgh commented
When trying the following code with citeproc-ruby 1.1.5:
require 'citeproc'
require 'csl/styles'
cp = CiteProc::Processor.new format: 'html'
cp << CiteProc::CitationItem.new(
:id => 'test',
:author => 'First Last',
:'container-title' => 'one & two & three',
)
puts cp.render(:bibliography, id: 'test').first
the output is
Last, First. n.d. <i>One &Amp; Two &Amp; Three</i>.
whereas it should be
Last, First. n.d. <i>One & Two & Three</i>.
Note how the &
escape sequence incorrectly was capitalized; i.e., it seems that capitalization is applied after HTML instead of before, while it should be the other way round.
inukshuk commented
Good catch, thanks!
RubenVerborgh commented
And impressive one-word fix, thanks!