Skip to content

Commit

Permalink
Escape html results
Browse files Browse the repository at this point in the history
  • Loading branch information
viraptor committed Aug 12, 2016
1 parent 60b11bc commit bc2e79f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions reconbf/lib/result.py
Expand Up @@ -16,6 +16,7 @@
from . import config
from . import constants

import cgi
import csv
import json
import subprocess
Expand Down Expand Up @@ -587,10 +588,12 @@ def _create_html_result_row(result, do_indent):

row_string = ""
row_string += " <tr>\n"
row_string += " <td{}>{}</td>\n".format(indent_class, result['name'])
row_string += " <td{}>{}</td>\n".format(
indent_class, cgi.escape(result['name']))
row_string += " <td{}>{}</td>\n".format(
result_class, _result_text(result['result'].result))
row_string += " <td>{}</td>\n".format(result['result'].notes or "")
row_string += " <td>{}</td>\n".format(
cgi.escape(result['result'].notes or ""))
row_string += " </tr>\n"

return row_string
Expand All @@ -617,7 +620,7 @@ def _create_html_group_row(result):

row_string = ""
row_string += " <tr>\n"
row_string += " <td>{}</td>\n".format(result['name'])
row_string += " <td>{}</td>\n".format(cgi.escape(result['name']))
row_string += " <td{}>{}</td>\n".format(
result_class, _result_text(result['result'].result))
row_string += " <td></td>\n"
Expand Down

0 comments on commit bc2e79f

Please sign in to comment.