Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

buildVideoUrl doesn't work on hashed URLs

Open bozghiyy opened this issue 8 years ago • 2 comments

Type of issue

dfpAdServerVideo Module bug

Description

When the page URL contains a hashtag, the DFP ad request is invalid.

Steps to reproduce

Any page that has an URL with hashtag.

Test page

http://prebid.org/examples/video/videojs-demo.html#vid1

Expected results

On the page with an URL without hashtag (http://prebid.org/examples/video/videojs-demo.html) The request is something like https://pubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=vast&unviewed_position_start=1&correlator=1525095632815&sz=640x480&url=http://prebid.org/examples/video/videojs-demo.html&iu=/19968336/prebid_cache_video_adunit&cust_params=hb_bidder%3DappnexusAst%26hb_adid%3D27595beeacd5c7%26hb_pb%3D10.00%26hb_size%3D640x480%26hb_uuid%3D87bf6427-5937-4c38-8708-a6de2ffcdc4b%26hb_cache_id%3D87bf6427-5937-4c38-8708-a6de2ffcdc4b%26section%3Dblog%26anotherKey%3DanotherValue

Actual results

On pages with an URL with hashtag the request is something like: https://pubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=vast&unviewed_position_start=1&correlator=1525095591738&sz=640x480&url=http://prebid.org/examples/video/videojs-demo.html Everything after the url parameter is stripped down which leads to an invalid request.

Platform details

All browsers.

Other information

https://github.com/prebid/Prebid.js/blob/master/modules/dfpAdServerVideo.js#L83

bozghiyy avatar Apr 30 '18 13:04 bozghiyy

Thanks. This was just fixed with this PR: https://github.com/prebid/Prebid.js/pull/2440

mkendall07 avatar Apr 30 '18 13:04 mkendall07

Sorry, didn't see it. Thanks!

bozghiyy avatar Apr 30 '18 14:04 bozghiyy