@@ -1,6 +1,6 @@
/* @flow */
-import { escape } from 'he'
+import { escape } from '../util'
import {
isDef,
import { genClassForVnode } from 'web/util/index'
export default function renderClass (node: VNodeWithData): ?string {
import { hyphenate } from 'shared/util'
import { getStyle } from 'web/util/style'
@@ -34,3 +34,18 @@ export const propsToAttrMap = {
htmlFor: 'for',
httpEquiv: 'http-equiv'
}
+
+const ESC = {
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ '&': '&'
+}
+export function escape (s: string) {
+ return s.replace(/[<>"&]/g, escapeChar)
+function escapeChar (a) {
+ return ESC[a] || a
+import { escape } from 'web/server/util'
import { isObject } from 'shared/util'
import { renderAttr } from 'web/server/modules/attrs'
import { renderClass } from 'web/util/class'
@@ -1,7 +1,6 @@
-const { escape } = require('he')
-
import { SSR_ATTR } from 'shared/constants'
import { RenderContext } from './render-context'
import { ssrCompileToFunctions } from 'web/server/compiler'