<commit_before>class MarkdownController < ActionController::Metal
  include ActionController::RackDelegation
  
  def process_markdown
    text = params[:notepad]
    self.response_body = text && text.empty? ? '' : RDiscount.new(text).to_html
  end
end<commit_msg>Escape <script> tags<commit_after>class MarkdownController < ActionController::Metal
  include ActionController::RackDelegation
  
  def process_markdown
    text = params[:notepad]
    self.response_body = text && text.empty? ? '' : CGI.escapeElement(RDiscount.new(text).to_html, "script")
  end
end
{'fraction_non_alphanumeric': 0.10638297872340426, 'fraction_numerical': 0.0, 'mean_word_length': 5.348314606741573, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7542550', 'n_tokens_mistral': 178, 'n_tokens_neox': 175, 'n_words': 32}