Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix escape

  • Loading branch information...
commit 2c93636a348e222a034741e3e83236c74daf349c 1 parent 10f7e75
@nicksergeant authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  views.py
View
2  views.py
@@ -55,7 +55,7 @@ def embed(request, snipt):
snipt.referer = request.META.get('HTTP_REFERER', '')
i = 0;
for sniptln in snipt.code_stylized:
- snipt.code_stylized[i] = snipt.code_stylized[i].replace(" font-weight: bold", " font-weight: normal").replace('\'','\\\'').replace('\\n','\\\\n').replace("\\x", "\\\\x").replace('\\'', '\\\\'')
+ snipt.code_stylized[i] = snipt.code_stylized[i].replace(" font-weight: bold", " font-weight: normal").replace('\'','\\\'').replace('\\n','\\\\n').replace("\\x", "\\\\x").replace('\\'', '\\\\'').replace('\\s', '\\\\s')
i = i + 1
except Snippet.DoesNotExist:
raise Http404
Please sign in to comment.
Something went wrong with that request. Please try again.