Change unsubscribe verifier to check for "Unsubscribe" shortcode
presence
This commit is contained in:
@@ -62,6 +62,7 @@ define([
|
||||
invalid_elements: "script",
|
||||
block_formats: 'Paragraph=p',
|
||||
relative_urls: false,
|
||||
remove_script_host: false,
|
||||
|
||||
plugins: "link textcolor colorpicker mailpoet_custom_fields",
|
||||
|
||||
|
@@ -62,6 +62,7 @@ define([
|
||||
invalid_elements: "script",
|
||||
block_formats: 'Paragraph=p',
|
||||
relative_urls: false,
|
||||
remove_script_host: false,
|
||||
|
||||
plugins: "link textcolor colorpicker mailpoet_custom_fields",
|
||||
|
||||
|
@@ -60,6 +60,7 @@ define([
|
||||
invalid_elements: "script",
|
||||
block_formats: 'Heading 1=h1;Heading 2=h2;Heading 3=h3;Paragraph=p',
|
||||
relative_urls: false,
|
||||
remove_script_host: false,
|
||||
|
||||
plugins: "link code textcolor colorpicker mailpoet_custom_fields",
|
||||
|
||||
|
@@ -283,8 +283,10 @@ define([
|
||||
return;
|
||||
}
|
||||
|
||||
var contents = JSON.stringify(jsonObject);
|
||||
if (App.getConfig().get('validation.validateUnsubscribeLinkPresent') &&
|
||||
JSON.stringify(jsonObject).indexOf("[link:subscription_unsubscribe_url]") < 0) {
|
||||
contents.indexOf("[link:subscription_unsubscribe_url]") < 0 &&
|
||||
contents.indexOf("[link:subscription_unsubscribe]") < 0) {
|
||||
this.showValidationError(MailPoet.I18n.t('unsubscribeLinkMissing'));
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user