Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
further xss protection
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisallenlane committed Jun 23, 2016
1 parent fcd6ce0 commit 1f8519e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/routes/archive.js
Expand Up @@ -31,8 +31,8 @@ module.exports = function (app, wit, callback) {
res.render('archive', {
page : {
title : 'archive',
name : 'archive', // TODO: pretty date?
url : req.url,
name : 'archive',
url : xss(req.url),
content : paginated.posts,
pagination : paginated.pagination,
date : {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/category.js
Expand Up @@ -24,7 +24,7 @@ module.exports = function(app, wit, callback) {
page : {
title : 'category',
name : category,
url : req.url,
url : xss(req.url),
content : paginated.posts,
pagination : paginated.pagination,
},
Expand Down
3 changes: 2 additions & 1 deletion app/routes/post.js
@@ -1,5 +1,6 @@
const config = require('../boot/config');
const paginate = require('../util/paginate');
const xss = require('xss');
var configs = config();

module.exports = function(app, wit, callback) {
Expand All @@ -16,7 +17,7 @@ module.exports = function(app, wit, callback) {
page : {
title : 'blog',
name : 'blog',
url : req.url,
url : xss(req.url),
content : paginated.posts,
pagination : paginated.pagination,
},
Expand Down
2 changes: 1 addition & 1 deletion app/routes/search.js
Expand Up @@ -26,7 +26,7 @@ module.exports = function (app, wit, callback) {
page : {
title : 'search',
name : query,
url : req.url,
url : xss(req.url),
content : paginated.posts,
pagination : paginated.pagination,
},
Expand Down
2 changes: 1 addition & 1 deletion app/routes/tag.js
Expand Up @@ -21,7 +21,7 @@ module.exports = function(app, wit, callback) {
page : {
title : 'tag',
name : tag,
url : req.url,
url : xss(req.url),
content : paginated.posts,
pagination : paginated.pagination,
},
Expand Down

0 comments on commit 1f8519e

Please sign in to comment.