@capillarytech/creatives-library 7.17.206-alpha.0 → 7.17.206
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/utils/tagValidations.js
CHANGED
|
@@ -253,5 +253,16 @@ export const preprocessHtml = (content) => {
|
|
|
253
253
|
"\n": "", // Handling newlines by replacing them with an empty string
|
|
254
254
|
};
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+
|
|
257
|
+
const styleTagRegex = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
|
|
258
|
+
|
|
259
|
+
const contentWithStyleFixes = content?.replace(styleTagRegex, (match, styleContent) => {
|
|
260
|
+
// Replace all occurrences of %} with % } within the style content
|
|
261
|
+
const modifiedStyleContent = styleContent?.replace(/%}/g, '% }');
|
|
262
|
+
// Reconstruct the <style> tag with the modified content
|
|
263
|
+
return match.replace(styleContent, modifiedStyleContent);
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
// Step 2: Perform the standard replacements on the entire content
|
|
267
|
+
return contentWithStyleFixes?.replace(/'|"|&|<|>|"|\n/g, match => replacements[match]);
|
|
257
268
|
};
|
|
@@ -18,8 +18,8 @@ import './style.scss';
|
|
|
18
18
|
// import messages from './messages';
|
|
19
19
|
const loadScript = require('load-script');
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
const defaultScriptUrl = 'https://nightly.intouch.capillarytech.com/arya/ui/library/ckeditor/ckeditor.js';
|
|
21
|
+
const defaultScriptUrl = `${window.location.origin}/arya/ui/library/ckeditor/ckeditor.js`;
|
|
22
|
+
//const defaultScriptUrl = 'https://nightly.intouch.capillarytech.com/arya/ui/library/ckeditor/ckeditor.js';
|
|
23
23
|
/*Uncomment the above line to use CKEDITOR in local
|
|
24
24
|
*/
|
|
25
25
|
const user = localStorage.getItem('user');
|
|
@@ -187,7 +187,6 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
187
187
|
this.setState({formData: nextProps.formData, tabCount: nextProps.tabCount});
|
|
188
188
|
// this.resetTabKeys(nextProps.formData, nextProps.tabCount);
|
|
189
189
|
} else if (this.props.schema && this.props.schema.channel && this.props.schema.channel.toUpperCase() === 'EMAIL') {
|
|
190
|
-
console.log('EMAIL isEdit', this.state.formData);
|
|
191
190
|
this.setState({formData: nextProps.formData});
|
|
192
191
|
}
|
|
193
192
|
|
|
@@ -1078,7 +1077,6 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1078
1077
|
}
|
|
1079
1078
|
};
|
|
1080
1079
|
}, () => {
|
|
1081
|
-
console.log('BC FORMDATA', this.state.formData);
|
|
1082
1080
|
if (this.props.onSubmit) {
|
|
1083
1081
|
this.props.onSubmit(this.state.formData);
|
|
1084
1082
|
}
|