html 在快速路线变量中

html in express route variables

我想将 <br/> 标记或某种形式的换行符传递到从 express 到 jade 的路由中。例如:

快递

router.get('/', function(req, res, next) {
  res.render('homepage', {
    content:'hello<br/>how are you'
  }
});

翡翠

p=content

但我只是在输出中得到 hello<br/>how are you 而不是

hello how are you

PS 我添加了 app.locals.pretty = true; 否则 html 会被完全省略

如果您改用 != 会怎样?

p!=content