瀏覽代碼

Fix bug with EJS on grunt-built instances (#192)

Fix EJS syntax being incorrectly escaped by the build step.
Gaël Métais 8 年之前
父節點
當前提交
b433736241
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 5 1
      Gruntfile.js
  2. 1 1
      front/src/main.html

+ 5 - 1
Gruntfile.js

@@ -243,7 +243,11 @@ module.exports = function(grunt) {
             build: {
                 options: {
                     base: '.tmp',
-                    method: 'append'
+                    method: 'append',
+                    unescape: {
+                        '&lt;': '<',
+                        '&gt;': '>'
+                    }
                 },
                 files: {
                     './front/build/main.html': ['.tmp/views/*.html']

+ 1 - 1
front/src/main.html

@@ -26,7 +26,7 @@
     <link rel="preconnect" href="https://api.github.com">
     <link rel="dns-prefetch" href="https://api.github.com">
 
-<head>
+</head>
 
 <body ng-app="YellowLabTools">
     <div id="header"><h1>Yellow Lab <span class="icon-lab"></span> Tools</h1></div>