diff --git a/extensions/amp-story/1.0/amp-story-page.js b/extensions/amp-story/1.0/amp-story-page.js index 70c4b813e2f9..30ae0b6cf054 100644 --- a/extensions/amp-story/1.0/amp-story-page.js +++ b/extensions/amp-story/1.0/amp-story-page.js @@ -1635,14 +1635,15 @@ export class AmpStoryPage extends AMP.BaseElement { '.i-amphtml-story-page-open-attachment-label' ); - const openAttachmentLabel = - attachmentEl.getAttribute('data-cta-text') || + const openLabelAttr = attachmentEl.getAttribute('data-cta-text'); + const openLabel = + (openLabelAttr && openLabelAttr.trim()) || Services.localizationService(this.win).getLocalizedString( LocalizedStringId.AMP_STORY_PAGE_ATTACHMENT_OPEN_LABEL ); this.mutateElement(() => { - textEl.textContent = openAttachmentLabel; + textEl.textContent = openLabel; this.element.appendChild(this.openAttachmentEl_); }); }