Mercurial > libervia-web
diff src/server/html_tools.py @ 451:1a0cec9b0f1e
better PEP-8 compliance
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 20 May 2014 10:54:03 +0200 |
parents | 981ed669d3b3 |
children | c8cca1a373dd |
line wrap: on
line diff
--- a/src/server/html_tools.py Tue May 20 07:22:10 2014 +0200 +++ b/src/server/html_tools.py Tue May 20 10:54:03 2014 +0200 @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. + def sanitizeHtml(text): """Sanitize HTML by escaping everything""" #this code comes from official python wiki: http://wiki.python.org/moin/EscapingHtml @@ -28,5 +29,4 @@ "<": "<", } - return "".join(html_escape_table.get(c,c) for c in text) - + return "".join(html_escape_table.get(c, c) for c in text)