From 28ade7d7f9e1c8e35de713a04303538140e22ea9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 13 Nov 2014 12:00:59 -0500 Subject: use plain html and \n ->
formatting on docs --- public/assets/stylesheets/app.css | 8 +++++++- server/lib/util.js | 4 +++- server/lib/views/index.js | 2 +- views/docs.ejs | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 7b53cca..48c6e97 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -633,7 +633,7 @@ iframe.embed { border-top:1px solid black; } -.footer a, .footer span{ +.footer a, .footer span { margin: 15px; font-weight: 300; font-size: 13px; @@ -643,6 +643,12 @@ iframe.embed { text-decoration:underline; } +.docs .content.doc-privacy p, +.docs .content.doc-terms p { + font-size: 15px; + line-height: 25px; + font-weight: 300; +} /* PROFILE PAGE */ .profilePic { diff --git a/server/lib/util.js b/server/lib/util.js index 791d3e2..0a71cb7 100644 --- a/server/lib/util.js +++ b/server/lib/util.js @@ -30,7 +30,9 @@ util.capitalizeWord = function (s) { util.escapeRegExp = function (s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") } - +util.htmlize = function(s) { + return ("

" + s.replace(/\n/g,"

") + "

").replace(/

<\/p>/, "
") +} util.cleanQuery = function (query) { var update = _.extend({}, query); diff --git a/server/lib/views/index.js b/server/lib/views/index.js index 6e3b449..b3a15c2 100644 --- a/server/lib/views/index.js +++ b/server/lib/views/index.js @@ -130,7 +130,7 @@ var views = module.exports = { } res.render('docs', { doc: doc, - content: marked(doc.body), + content: util.htmlize(doc.body), isNew: false }) }) diff --git a/views/docs.ejs b/views/docs.ejs index 741cff7..b3ead82 100644 --- a/views/docs.ejs +++ b/views/docs.ejs @@ -11,7 +11,7 @@ [[ if (! isNew) { ]]

[[- doc.displayName ]]

-
+
[[- content ]]
-- cgit v1.2.3-70-g09d2