Skip to content

Commit

Permalink
Fix subdomain handling in lentainform widgets (ampproject#24546)
Browse files Browse the repository at this point in the history
  • Loading branch information
velichkin authored and lannka committed Oct 2, 2019
1 parent 63a4545 commit ee85a15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ads/lentainform.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ export function lentainform(global, data) {

document.body.appendChild(scriptRoot);

const publisherStr = data.publisher.replace(/[^A-z0-9]/g, '');

const url =
`https://jsc.lentainform.com/${encodeURIComponent(data.publisher[0])}/` +
`${encodeURIComponent(data.publisher[1])}/` +
`https://jsc.lentainform.com/${encodeURIComponent(publisherStr[0])}/` +
`${encodeURIComponent(publisherStr[1])}/` +
`${encodeURIComponent(data.publisher)}.` +
`${encodeURIComponent(data.widget)}.js?t=` +
Math.floor(Date.now() / 36e5);
Expand Down

0 comments on commit ee85a15

Please sign in to comment.