Highlight should not be able to render local files.

This commit is contained in:
Tom Preston-Werner
2010-08-24 15:05:28 -07:00
parent 5e997cae21
commit d9bc00c804
3 changed files with 16 additions and 4 deletions

View File

@@ -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