diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index 143555c8..c4dea149 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -11,10 +11,11 @@ module Jekyll def initialize(tag_name, markup, tokens) super @file, @params = markup.strip.split(' ', 2); + validate_file_name end def parse_params(context) - validate_syntax + validate_params params = {} markup = @params @@ -35,12 +36,6 @@ module Jekyll params end - # ensure the entire markup string from start to end is valid syntax, and params are separated by spaces - def validate_syntax - validate_file_name - validate_params - end - def validate_file_name if @file !~ /^[a-zA-Z0-9_\/\.-]+$/ || @file =~ /\.\// || @file =~ /\/\./ raise SyntaxError.new <<-eos