Issue #9304 has been updated by mame (Yusuke Endoh).

Status changed from Open to Rejected

duerst (Martin Dürst) wrote:
> > So I now guess this is a bug of Chrome's XML viewer.
> 
> Actually, not the XML viewer, but the source viewer, in my case.

Ah, you are right.


Easy way to reproduce:

$ ruby -e '
puts %(<?xml version="1.0"?>)
puts %(<foo>)
10000.times { puts %(&lt;x&gt;&lt;/x&gt;) }
puts %(</foo>)
' > t.xml

$ google-chrome t.xml

and view page source.  "&tt;" appears twice in my machine.

I'm closing this ticket because apparently this is a bug of Chrome, not Ruby nor Jekyll.
Please reopen if you could reproduce the issue on a browser but Chrome.

-- 
Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Bug #9304: Invalid XML entity references
https://bugs.ruby-lang.org/issues/9304#change-43917

Author: ploeh (Mark Seemann)
Status: Rejected
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 2.0.0
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN


=begin
It seems that the escapeHTML method occasionally generates the invalid XML entity reference (({&tt;})) when XML escaping.

See this Stack Overflow question for more details: http://stackoverflow.com/q/20563078/126014

Although I see this issue manifest itself in Jekyll, the Jekyll maintainers closed the issue I reported there because the Jekyll filter delegates to CGI.escapHTML.

Could it be a but in escapeHTML?

I'm seeing this on my own system, which is currently reporting:

$ ruby --version

ruby 2.0.0p247 (2013-06-27) [i386-mingw32]

but I'm also seeing this on GitHub pages, and I don't know the exact version of Ruby running in that environment.
=end


-- 
http://bugs.ruby-lang.org/