File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ exports.default = function (content) {
99 try {
1010 var value = typeof content === 'string' ? JSON . parse ( content ) : content ;
1111 value = JSON . stringify ( value ) . replace ( / \u2028 / g, '\\u2028' ) . replace ( / \u2029 / g, '\\u2029' ) ;
12- var code = 'module.exports = function (Component) { Component.options.__i18n = \'' + value + '\' }' ;
12+ var code = 'module.exports = function (Component) { Component.options.__i18n = \'' + value . replace ( / \u0027 / g , '\\u0027' ) + '\' }' ;
1313 this . callback ( null , code ) ;
1414 } catch ( err ) {
1515 this . emitError ( err . message ) ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default function (content) {
77 value = JSON . stringify ( value )
88 . replace ( / \u2028 / g, '\\u2028' )
99 . replace ( / \u2029 / g, '\\u2029' )
10- const code = `module.exports = function (Component) { Component.options.__i18n = '${ value } ' }`
10+ const code = `module.exports = function (Component) { Component.options.__i18n = '${ value . replace ( / \u0027 / g , '\\u0027' ) } ' }`
1111 this . callback ( null , code )
1212 } catch ( err ) {
1313 this . emitError ( err . message )
You can’t perform that action at this time.
0 commit comments