Skip to content

Commit

Permalink
🖍 [Attachment Forms] Remove the 'www.' prefix from the displayed publ…
Browse files Browse the repository at this point in the history
…isher domain in the page attachment header (#36718)

* Remove the 'www.' prefix from the displayed publisher domain in the page attachment header

* Consolidate the two replace() calls into a single call
  • Loading branch information
coreymasanto committed Nov 3, 2021
1 parent 8b008bd commit 2d5d9a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/amp-story/1.0/amp-story-page-attachment.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,6 @@ export class AmpStoryPageAttachment extends DraggableDrawer {
*/
getPublisherOrigin_() {
const publisherOrigin = getSourceOrigin(this.getAmpDoc().getUrl());
return publisherOrigin.replace(/https?:\/\//, '');
return publisherOrigin.replace(/^http(s)?:\/\/(www.)?/, '');
}
}

0 comments on commit 2d5d9a2

Please sign in to comment.