From 0f147374b765443d7510b865db703479098f9c0e Mon Sep 17 00:00:00 2001 From: Evan Tseng Date: Mon, 20 Feb 2017 16:00:45 +0800 Subject: [PATCH] Bug 1323861 - Remove the readScript method, r=Gijs --- JSDOMParser.js | 46 +- test/test-jsdomparser.js | 21 +- test/test-pages/001/source.html | 2 +- test/test-pages/ars-1/source.html | 12 +- test/test-pages/bbc-1/source.html | 22 +- test/test-pages/blogger/source.html | 2 +- .../breitbart/expected-metadata.json | 7 + test/test-pages/breitbart/expected.html | 26 + test/test-pages/breitbart/source.html | 19848 ++++++++++++++++ test/test-pages/buzzfeed-1/source.html | 66 +- test/test-pages/ehow-1/source.html | 112 +- test/test-pages/herald-sun-1/source.html | 3 +- test/test-pages/lemonde-1/source.html | 6 +- test/test-pages/liberation-1/source.html | 38 +- test/test-pages/salon-1/source.html | 2 +- test/test-pages/tmz-1/source.html | 4 +- test/test-pages/wapo-1/source.html | 8 +- test/test-pages/wapo-2/source.html | 4 +- test/test-pages/webmd-1/source.html | 52 +- test/test-pages/webmd-2/source.html | 18 +- 20 files changed, 20073 insertions(+), 226 deletions(-) create mode 100644 test/test-pages/breitbart/expected-metadata.json create mode 100644 test/test-pages/breitbart/expected.html create mode 100644 test/test-pages/breitbart/source.html diff --git a/JSDOMParser.js b/JSDOMParser.js index 3a26037..18328f6 100644 --- a/JSDOMParser.js +++ b/JSDOMParser.js @@ -1010,46 +1010,6 @@ } }, - readScript: function (node) { - while (this.currentChar < this.html.length) { - var c = this.nextChar(); - var nextC = this.peekNext(); - if (c === "<") { - if (nextC === "!" || nextC === "?") { - // We're still before the ! or ? that is starting this comment: - this.currentChar++; - node.appendChild(this.discardNextComment()); - continue; - } - if (nextC === "/" && this.html.substr(this.currentChar, 8 /*"/script>".length */).toLowerCase() == "/script>") { - // Go back before the '<' so we find the end tag. - this.currentChar--; - // Done with this script tag, the caller will close: - return; - } - } - // Either c wasn't a '<' or it was but we couldn't find either a comment - // or a closing script tag, so we should just parse as text until the next one - // comes along: - - var haveTextNode = node.lastChild && node.lastChild.nodeType === Node.TEXT_NODE; - var textNode = haveTextNode ? node.lastChild : new Text(); - var n = this.html.indexOf("<", this.currentChar); - // Decrement this to include the current character *afterwards* so we don't get stuck - // looking for the same < all the time. - this.currentChar--; - if (n === -1) { - textNode.innerHTML += this.html.substring(this.currentChar, this.html.length); - this.currentChar = this.html.length; - } else { - textNode.innerHTML += this.html.substring(this.currentChar, n); - this.currentChar = n; - } - if (!haveTextNode) - node.appendChild(textNode); - } - }, - discardNextComment: function() { if (this.match("--")) { this.discardTo("-->"); @@ -1124,11 +1084,7 @@ // If this isn't a void Element, read its child nodes if (!closed) { - if (localName == "script") { - this.readScript(node); - } else { - this.readChildren(node); - } + this.readChildren(node); var closingTag = ""; if (!this.match(closingTag)) { this.error("expected '" + closingTag + "' and got " + this.html.substr(this.currentChar, closingTag.length)); diff --git a/test/test-jsdomparser.js b/test/test-jsdomparser.js index 4dab953..7facd49 100644 --- a/test/test-jsdomparser.js +++ b/test/test-jsdomparser.js @@ -6,7 +6,7 @@ var readability = require("../index.js"); var JSDOMParser = readability.JSDOMParser; var BASETESTCASE = '

Some text and a link

' + - '
With a that is fun.And another node to make it harder
Here\'s a form
'; var baseDoc = new JSDOMParser().parse(BASETESTCASE); @@ -32,7 +32,7 @@ describe("Test JSDOM functionality", function() { expect(generatedHTML).eql('Some text and a link'); var scriptNode = baseDoc.getElementsByTagName("script")[0]; generatedHTML = scriptNode.innerHTML; - expect(generatedHTML).eql('With < fancy " characters in it because'); + expect(generatedHTML).eql('With < fancy " characters in it because'); expect(scriptNode.textContent).eql('With < fancy " characters in it because'); }); @@ -236,7 +236,7 @@ describe("Script parsing", function() { expect(doc.firstChild.tagName).eql("SCRIPT"); expect(doc.firstChild.textContent).eql(""); expect(doc.firstChild.children.length).eql(0); - expect(doc.firstChild.childNodes.length).eql(1); + expect(doc.firstChild.childNodes.length).eql(0); }); it("should strip !-based comments within script tags", function() { @@ -245,11 +245,11 @@ describe("Script parsing", function() { expect(doc.firstChild.tagName).eql("SCRIPT"); expect(doc.firstChild.textContent).eql(""); expect(doc.firstChild.children.length).eql(0); - expect(doc.firstChild.childNodes.length).eql(1); + expect(doc.firstChild.childNodes.length).eql(0); }); it("should strip any other nodes within script tags", function() { - var html = ""; + var html = ""; var doc = new JSDOMParser().parse(html); expect(doc.firstChild.tagName).eql("SCRIPT"); expect(doc.firstChild.textContent).eql("
Hello, I'm not really in a
"); @@ -257,8 +257,17 @@ describe("Script parsing", function() { expect(doc.firstChild.childNodes.length).eql(1); }); + it("should strip any other invalid script nodes within script tags", function() { + var html = ''; + var doc = new JSDOMParser().parse(html); + expect(doc.firstChild.tagName).eql("SCRIPT"); + expect(doc.firstChild.textContent).eql(""); + expect(doc.firstChild.children.length).eql(0); + expect(doc.firstChild.childNodes.length).eql(1); + }); + it("should not be confused by partial closing tags", function() { - var html = ""; + var html = ""; var doc = new JSDOMParser().parse(html); expect(doc.firstChild.tagName).eql("SCRIPT"); expect(doc.firstChild.textContent).eql("var x = ' diff --git a/test/test-pages/ars-1/source.html b/test/test-pages/ars-1/source.html index 6721ed2..cd6aed1 100644 --- a/test/test-pages/ars-1/source.html +++ b/test/test-pages/ars-1/source.html @@ -655,7 +655,7 @@ } }); CN.dart.getCommon()["domDelay"]["defaultVal"] = 100; - for (var i = 0; i < ars.AD.queue.length; i++) { + for (var i = 0; i < ars.AD.queue.length; i++) { var ad = ars.AD.queue[i], id = ad[0], args = ad[1]; @@ -678,10 +678,10 @@ function program1(depth0, data) { var buffer = "", stack1; - buffer += "\n \n \n \n "; + buffer += "\n <span style=\"width:50px; height:50px; overflow:hidden; display:inline-block; float:left; margin:2px 10px 5px 0\">\n <img src=\"" + escapeExpression(((stack1 = ((stack1 = depth0.image), stack1 == null || stack1 === false ? stack1 : stack1.href)), typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) + "\" style=\"float:none; margin:0; height:50px; width:auto;\" />\n </span>\n "; return buffer; } - buffer += "
  • \n \n

    Sponsored by: " + escapeExpression(((stack1 = ((stack1 = depth0.sponsor), stack1 == null || stack1 === false ? stack1 : stack1.name)), typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) + "

    \n "; + buffer += escapeExpression(stack1) + "\">\n <h2 style=\"color:#00A3D3;\">Sponsored by: <span style=\"text-transform:none;\">" + escapeExpression(((stack1 = ((stack1 = depth0.sponsor), stack1 == null || stack1 === false ? stack1 : stack1.name)), typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) + "</span></h2>\n "; stack2 = helpers['if'].call(depth0, ((stack1 = depth0.image), stack1 == null || stack1 === false ? stack1 : stack1.href), { hash: {}, inverse: self.noop, @@ -701,7 +701,7 @@ if (stack2 || stack2 === 0) { buffer += stack2; } - buffer += "\n

    "; + buffer += "\n <h1 class=\"heading\">"; if (stack2 = helpers.title) { stack2 = stack2.call(depth0, { hash: {}, @@ -711,7 +711,7 @@ stack2 = depth0.title; stack2 = typeof stack2 === functionType ? stack2.apply(depth0) : stack2; } - buffer += escapeExpression(stack2) + "

    \n
    \n
  • "; + buffer += escapeExpression(stack2) + "</h1>\n </a>\n</li>"; return buffer; }; diff --git a/test/test-pages/bbc-1/source.html b/test/test-pages/bbc-1/source.html index 7004155..876c893 100644 --- a/test/test-pages/bbc-1/source.html +++ b/test/test-pages/bbc-1/source.html @@ -111,8 +111,8 @@ })(); - + @@ -122,7 +122,7 @@ - +
    +
    @@ -578,7 +578,7 @@ if ( eligible[country_code] ) {
    - +
    @@ -2301,7 +2301,7 @@ body .OUTBRAIN .AR_8 .ob-unit.ob-rec-text { -
    + + + + + + + + + + + + + + + + + + + + + + + + 'Neutral' Snopes Fact-Checker David Emery: 'Are There Any Un-Angry Trump Supporters?' - Breitbart + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + Skip to content +
    +
    +
    +
    report this ad
    + +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + + + + +
    +
    +
    + + +
    +
    +
    + +
    + SHOP NOW > + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    'Neutral' Snopes Fact-Checker David Emery: 'Are There Any Un-Angry Trump Supporters?'

    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    + + +
    +
    +
    + +
    +

    SIGN UP FOR OUR NEWSLETTER

    +
    + +
    +
    +
      +
    • +
    +
    +
    +
    +
    +

    Snopes fact checker and staff writer David Emery posted to Twitter asking if there were “any un-angry Trump supporters?”

    +

    Emery, a writer for partisan “fact-checking” website Snopes.com which soon will be in charge of labelling “fake news” alongside ABC News and Politifact, retweeted an article by Vulture magazine relating to the protests of the Hamilton musical following the decision by the cast of the show to make a public announcement to Vice-president elect Mike Pence while he watched the performance with his family.

    +
    +

    SIGN UP FOR OUR NEWSLETTER

    +
    + +
    +
    +
      +
    • +
    +
    +
    +
    +
    +

    The tweet from Vulture magazine reads, “#Hamilton Chicago show interrupted by angry Trump supporter.” Emery retweeted the story, saying, “Are there un-angry Trump supporters?”

    + +

    + +

    + +
    +
    +
    + + +

    This isn’t the first time the Snopes.com writer has expressed anti-Trump sentiment on his Twitter page. In another tweet in which Emery links to an article that falsely attributes a quote to President-elect Trump, Emery states, “Incredibly, some people actually think they have to put words in Trump’s mouth to make him look bad.”

    + +

    + +

    +

    Emery also retweeted an article by New York magazine that claimed President-elect Trump relied on lies to win during his campaign and that we now lived in a “post-truth” society. “Before long we’ll all have forgotten what it was like to live in the same universe; or maybe we already have,” Emery tweeted.

    + +
    +
    +
    + + + +

    + +

    +

    Facebook believe that Emery, along with other Snopes writers, ABC News, and Politifact are impartial enough to label and silence what they believe to be “fake news” on social media.

    +

    Lucas Nolan is a reporter for Breitbart Tech covering issues of free speech and online censorship. Follow him on Twitter @LucasNolan_ or email him at lnolan@breitbart.com

    + +
    +
    +
    + + +
    + +
    + +
    report this ad
    + +
    + +
    Trending Articles
    +
    + + +
    +

    Gloria Steinem: Woman Felt ‘Sexually Assaulted’ by Trump’s…

    +

    Monday on MSNBC’s “All In,” discussing Saturday’s women’s march on Washington, feminist and…

    + +
    +
    +
    +
    + + + + +
    +
    +
    + + + +
    +
    + +
    +
    + +
    + +
    +
    Around The Web Powered By ZergNet
    + +
    + +
    + + +
    +


    Comment count on this article reflects comments made on Breitbart.com and Facebook. Visit Breitbart's Facebook Page.

    +
    + +
    + + + + +
    + + +
    +
    + +
    + + +
    + + + + + + + + + + + +
    + +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + +
    +
    AddThis Sharing
    +
    +
    ­ + + + diff --git a/test/test-pages/buzzfeed-1/source.html b/test/test-pages/buzzfeed-1/source.html index bc099b5..f51556a 100644 --- a/test/test-pages/buzzfeed-1/source.html +++ b/test/test-pages/buzzfeed-1/source.html @@ -264,9 +264,9 @@ - if (AB_RND_VAL >= 0 && AB_RND_VAL < 33) { + if (AB_RND_VAL >= 0 && AB_RND_VAL < 33) { AD_SIDEWIDE_BSU_REDESIGN = 'bsu_a'; - } else if (AB_RND_VAL > 33 && AB_RND_VAL <= 66) { + } else if (AB_RND_VAL > 33 && AB_RND_VAL <= 66) { AD_SIDEWIDE_BSU_REDESIGN = 'bsu_b'; } else { AD_SIDEWIDE_BSU_REDESIGN = 'bsu_c' @@ -281,7 +281,7 @@ var AD_DESIGN, AD_THUMBNAIL; AD_THUMBNAIL = 'thumbnailcontrol'; - if (AB_RND_VAL >= 0 && AB_RND_VAL < 0) { + if (AB_RND_VAL >= 0 && AB_RND_VAL < 0) { AD_DESIGN = 'script'; } else { AD_DESIGN = 'gpt'; @@ -527,9 +527,9 @@ }; var cookieBarVerticalBpageMessage = { - 'fr': "Vous connaissez BuzzFeed France? C'est par ici!", - 'es': "Ya viste BuzzFeed en Español? ¡Pasa a darle una mirada!", - 'pt': "Já viu BuzzFeed Brasil? Venha conferir!" + 'fr': "Vous connaissez BuzzFeed France? <a href='" + homePageLink['fr'] + "'>C'est par ici!</a>", + 'es': "Ya viste BuzzFeed en Español? <a href='" + homePageLink['es'] + "'>¡Pasa a darle una mirada!</a>", + 'pt': "Já viu BuzzFeed Brasil? <a href='" + homePageLink['pt'] + "'>Venha conferir!</a>" }; @@ -905,7 +905,7 @@ QuantcastCounter = 0; function QuantPageLoad() { - if (typeof(_qevents) == 'undefined' && QuantcastCounter < 20) { + if (typeof(_qevents) == 'undefined' && QuantcastCounter < 20) { QuantcastCounter++; setTimeout("QuantPageLoad()", 250); return false; @@ -3272,7 +3272,7 @@ }) } else { if (!BF_STATIC.bf_test_mode || document.cookie.match('sel2_ad') !== null) { - document.write('<' + 'scr' + 'ipt type="text/javascr' + 'ipt" src="' + ad_tag + '"><\/scr' + 'ipt' + '>'); + document.write('<' + 'scr' + 'ipt type="text/javascr' + 'ipt" src="' + ad_tag + '"><\/scr' + 'ipt' + '>'); } else { console.info('disable DFP (dfp_tags.tt)'); } @@ -3843,7 +3843,7 @@ }) } else { if (!BF_STATIC.bf_test_mode || document.cookie.match('sel2_ad') !== null) { - document.write('<' + 'scr' + 'ipt type="text/javascr' + 'ipt" src="' + ad_tag + '"><\/scr' + 'ipt' + '>'); + document.write('<' + 'scr' + 'ipt type="text/javascr' + 'ipt" src="' + ad_tag + '"><\/scr' + 'ipt' + '>'); } else { console.info('disable DFP (dfp_tags.tt)'); } @@ -4083,7 +4083,7 @@ }) } else { if (!BF_STATIC.bf_test_mode || document.cookie.match('sel2_ad') !== null) { - document.write('<' + 'scr' + 'ipt type="text/javascr' + 'ipt" src="' + ad_tag + '"><\/scr' + 'ipt' + '>'); + document.write('<' + 'scr' + 'ipt type="text/javascr' + 'ipt" src="' + ad_tag + '"><\/scr' + 'ipt' + '>'); } else { console.info('disable DFP (dfp_tags.tt)'); } @@ -4336,7 +4336,7 @@ "active": "1", "original_image_height": "578", "height": "83", - "description": "In my secular life, I'm a marathoner and stand-up comic. In the eyes of the church, I'm a charity case.", + "description": "<b>In my secular life, I'm a marathoner and stand-up comic.</b> In the eyes of the church, I'm a charity case.", "image": "/static/2015-04/27/9/campaign_images/webdr02/mormon-childless-and-constantly-condescended-to-2-8804-1430140118-12.jpg", "old": "0", "promotion_medium_id": "1", @@ -4387,7 +4387,7 @@ "active": "1", "original_image_height": "578", "height": "83", - "description": "In my secular life, I'm a marathoner and stand-up comic. In the eyes of the church, I'm a charity case.", + "description": "<b>In my secular life, I'm a marathoner and stand-up comic.</b> In the eyes of the church, I'm a charity case.", "image": "/static/2015-04/27/9/campaign_images/webdr02/mormon-childless-and-constantly-condescended-to-2-8804-1430140118-12.jpg", "old": "0", "promotion_medium_id": "1", @@ -4438,7 +4438,7 @@ "active": "1", "original_image_height": "578", "height": "83", - "description": "In my secular life, I'm a marathoner and stand-up comic. In the eyes of the church, I'm a charity case.", + "description": "<b>In my secular life, I'm a marathoner and stand-up comic.</b> In the eyes of the church, I'm a charity case.", "image": "/static/2015-04/27/9/campaign_images/webdr02/mormon-childless-and-constantly-condescended-to-2-8804-1430140118-12.jpg", "old": "0", "promotion_medium_id": "1", @@ -4489,7 +4489,7 @@ "active": "1", "original_image_height": "578", "height": "83", - "description": "In my secular life, I'm a marathoner and stand-up comic. In the eyes of the church, I'm a charity case.", + "description": "<b>In my secular life, I'm a marathoner and stand-up comic.</b> In the eyes of the church, I'm a charity case.", "image": "/static/2015-04/27/9/campaign_images/webdr02/mormon-childless-and-constantly-condescended-to-2-8804-1430140122-14.jpg", "old": "0", "promotion_medium_id": "1", @@ -4499,8 +4499,8 @@ "original_image": "/static/2015-04/25/20/enhanced/webdr13/original-25550-1430009073-11.jpg" }]; var opts = []; - for (var i = 0; i < promotions.length; i++) - for (var j = 0; j < (promotions[i].probability * 100); j++) opts.push(promotions[i]); + for (var i = 0; i < promotions.length; i++) + for (var j = 0; j < (promotions[i].probability * 100); j++) opts.push(promotions[i]); var sel_promo = opts[Math.floor(Math.random() * opts.length)]; imp_attr_3762507_13.FLEX_PRO_IMP = sel_promo.id; click_attr_3762507_13.FLEX_PRO_CLICK = sel_promo.id; @@ -4508,16 +4508,16 @@

    Gunmen opened fire on visitors at @@ -834,7 +834,7 @@

    {email}
    You will receive your first newsletter with our next scheduled circulation!

    ', + successMsg: '<p class="success"><span>{email}</span><br //>You will receive your first newsletter with our next scheduled circulation!</p>', content: '' + - '
    \n' + - '
    \n' + - '
    {header}
    \n' + + '<div class="newsletterFmt"></div>\n' + + '<div class="wrapper">\n' + + '<div class="nls-header">{header}</div>\n' + '{preContent}' + - '
    \n' + + '<div class="nls-content">\n' + '{preForm}' + - '
    \n' + - '
    {inputs}
    \n' + - '
    ' + - "By clicking submit I agree to WebMD's Privacy Policy" + - '
    ' + - '
    \n' + - '\n' + // .email-container - '
    \n' + // .input-container - '
    \n' + - 'Sign up for more topics!' + + '<form class="nls-form" action="#" novalidate="novalidate">\n' + + '<div class="validationWrapper"><div class="checkbox-container clearfix">{inputs}</div></div>\n' + + '<div class="privacy-disclaimer">' + + "<em>By clicking submit I agree to WebMD's <a href='http://www.webmd.com/about-webmd-policies/about-privacy-policy' target='_blank'>Privacy Policy</a></em>" + + '</div>' + + '<div class="input-container">\n' + + '<div class="email-container validationWrapper">\n' + + '<input type="email" class="nls-email" name="email" autocapitalize="off" autocorrect="off" placeholder="Enter email address" /> ' + + '<button name="nl-submit" formnovalidate class="off {submitClass}" type="submit"><span>Submit</span></button>\n' + + '<div class="clearfix"></div>' + + '</div>\n' + // .email-container + '</div>\n' + // .input-container + '</form>\n' + + '<a class="nl-link" href="https://member.webmd.com/newsletters/newsletters.aspx" onclick="return sl(this,"nw","nl-multie_s")">Sign up for more topics!</a>' + '{postForm}' + - '
    \n' + // .nls-content + '</div>\n' + // .nls-content '{postContent}' + - '
    ', + '</div>', submitClass: 'webmd-btn webmd-btn-pr webmd-btn-s', - successHeader: '

    Thank You For Signing Up.

    ', - promo: '
    WebMD App

    {text}

    ' + successHeader: '<h2>Thank You For Signing Up.</h2>', + promo: '<div class="promo"><div class="promo-content clearfix"><img src="{image}" alt="WebMD App" /><div class="promo-description"><p>{text}</p><p class="promoLink"><a href="{url}" class="webmd-btn webmd-btn-pr webmd-btn-m" onclick="wmdPageLink(\'nlupgrd_sub\')">{button}</a></p><div class="clearfix"></div></div></div></div>' } }); @@ -2330,7 +2330,7 @@ diff --git a/test/test-pages/webmd-2/source.html b/test/test-pages/webmd-2/source.html index 2378df5..d7b374b 100644 --- a/test/test-pages/webmd-2/source.html +++ b/test/test-pages/webmd-2/source.html @@ -617,7 +617,7 @@ /* Pulls the pub source out of the XML */ var pubSource = 'WebMD Medical News'; /* Runs through the different partners and sees if one of them exists in the pub source */ - for (var i = 0; i <= partnerNames.length - 1; i++) { + for (var i = 0; i <= partnerNames.length - 1; i++) { isThere = pubSource.search(partnerNames[i]); if (isThere != -1) { whichOne = i @@ -1074,14 +1074,14 @@ module.init({ selector: "#newsletter-mapping-center", template: { - successMsg: '

    {email}
    You will receive your first newsletter with our next scheduled circulation!

    ', - content: '' + '
    \n' + '
    \n' + '
    {header}
    \n' + '{preContent}' + '
    \n' + '{preForm}' + '
    \n' + '
    {inputs}
    \n' + '
    ' + "By clicking submit I agree to WebMD's Privacy Policy" + '
    ' + '
    \n' + '\n' + // .email-container - '
    \n' + // .input-container - '
    \n' + 'Sign up for more topics!' + '{postForm}' + '
    \n' + // .nls-content - '{postContent}' + '
    ', + successMsg: '<p class="success"><span>{email}</span><br //>You will receive your first newsletter with our next scheduled circulation!</p>', + content: '' + '<div class="newsletterFmt"></div>\n' + '<div class="wrapper">\n' + '<div class="nls-header">{header}</div>\n' + '{preContent}' + '<div class="nls-content">\n' + '{preForm}' + '<form class="nls-form" action="#" novalidate="novalidate">\n' + '<div class="validationWrapper"><div class="checkbox-container clearfix">{inputs}</div></div>\n' + '<div class="privacy-disclaimer">' + "<em>By clicking submit I agree to WebMD's <a href='http://www.webmd.com/about-webmd-policies/about-privacy-policy' target='_blank'>Privacy Policy</a></em>" + '</div>' + '<div class="input-container">\n' + '<div class="email-container validationWrapper">\n' + '<input type="email" class="nls-email" name="email" autocapitalize="off" autocorrect="off" placeholder="Enter email address" /> ' + '<button name="nl-submit" formnovalidate class="off {submitClass}" type="submit"><span>Submit</span></button>\n' + '<div class="clearfix"></div>' + '</div>\n' + // .email-container + '</div>\n' + // .input-container + '</form>\n' + '<a class="nl-link" href="https://member.webmd.com/newsletters/newsletters.aspx" onclick="return sl(this,"nw","nl-multie_s")">Sign up for more topics!</a>' + '{postForm}' + '</div>\n' + // .nls-content + '{postContent}' + '</div>', submitClass: 'webmd-btn webmd-btn-pr webmd-btn-s', - successHeader: '

    Thank You For Signing Up.

    ', - promo: '
    WebMD App

    {text}

    ' + successHeader: '<h2>Thank You For Signing Up.</h2>', + promo: '<div class="promo"><div class="promo-content clearfix"><img src="{image}" alt="WebMD App" /><div class="promo-description"><p>{text}</p><p class="promoLink"><a href="{url}" class="webmd-btn webmd-btn-pr webmd-btn-m" onclick="wmdPageLink(\'nlupgrd_sub\')">{button}</a></p><div class="clearfix"></div></div></div></div>' } }); }); @@ -1203,7 +1203,7 @@