Highlight should not be able to render local files.
This commit is contained in:
parent
5e997cae21
commit
d9bc00c804
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 %{<pre><code class='text'>./jekyll.gemspec\n</code></pre>}, @result
|
||||
end
|
||||
end
|
||||
|
||||
context "post content has highlight tag with UTF character" do
|
||||
setup do
|
||||
fill_post("Æ")
|
||||
|
|
Loading…
Reference in New Issue