Executes the given command and returns the standard output. All special HTML characters are escaped.
Execute the command and return the standard output.
# File lib/webgen/tag/executecommand.rb, line 17 def call(tag, body, context) command = param('tag.executecommand.command') output = `#{command} 2> #{BIT_BUCKET}` if $?.exitstatus != 0 raise Webgen::RenderError.new("Command '#{command}' has return value != 0: #{output}", self.class.name, context.dest_node, context.ref_node) end output = CGI::escapeHTML(output) if param('tag.executecommand.escape_html') [output, param('tag.executecommand.process_output')] end
Generated with the Darkfish Rdoc Generator 2.