nit: use 'html/raw' instead of html() where possible

This commit is contained in:
Danny Coates 2018-02-11 14:02:40 -08:00
parent 950c9cdaeb
commit dcfda9521b
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
3 changed files with 14 additions and 11 deletions

View file

@ -1,4 +1,5 @@
const html = require('choo/html');
const raw = require('choo/html/raw');
function replaceLinks(str, urls) {
let i = -1;
@ -6,7 +7,7 @@ function replaceLinks(str, urls) {
i++;
return `<a href="${urls[i]}">${v}</a>`;
});
return [`<div class="description">${s}</div>`];
return `<div class="description">${s}</div>`;
}
module.exports = function(state) {
@ -14,14 +15,14 @@ module.exports = function(state) {
<div id="page-one">
<div id="legal">
<div class="title">${state.translate('legalHeader')}</div>
${html(
${raw(
replaceLinks(state.translate('legalNoticeTestPilot'), [
'https://testpilot.firefox.com/terms',
'https://testpilot.firefox.com/privacy',
'https://testpilot.firefox.com/experiments/send'
])
)}
${html(
${raw(
replaceLinks(state.translate('legalNoticeMozilla'), [
'https://www.mozilla.org/privacy/websites/',
'https://www.mozilla.org/about/legal/terms/mozilla/'