diff --git a/History.txt b/History.txt index 55aa6027..f0de13dd 100644 --- a/History.txt +++ b/History.txt @@ -1,3 +1,7 @@ +== HEAD + * Bug Fixes + * Highlight should not be able to render local files + == 0.6.2 / 2010-06-25 * Bug Fixes * Fix Rakefile 'release' task (tag pushing was missing origin) diff --git a/lib/jekyll/albino.rb b/lib/jekyll/albino.rb index 10d0ffb9..f71e6382 100644 --- a/lib/jekyll/albino.rb +++ b/lib/jekyll/albino.rb @@ -54,7 +54,7 @@ class Albino end def initialize(target, lexer = :text, format = :html) - @target = File.exists?(target) ? File.read(target) : target rescue target + @target = target @options = { :l => lexer, :f => format, :O => 'encoding=utf-8' } end diff --git a/test/test_tags.rb b/test/test_tags.rb index ac92deda..d25aa705 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -24,9 +24,7 @@ title: This is a test This document results in a markdown error with maruku -{% highlight text %} -#{code} -{% endhighlight %} +{% highlight text %}#{code}{% endhighlight %} CONTENT create_post(content, override) end @@ -45,6 +43,16 @@ CONTENT end end + context "post content has highlight with file reference" do + setup do + fill_post("./jekyll.gemspec") + end + + should "not embed the file" do + assert_match %{
./jekyll.gemspec\n
}, @result + end + end + context "post content has highlight tag with UTF character" do setup do fill_post("Æ")