prebid-mobile-android icon indicating copy to clipboard operation
prebid-mobile-android copied to clipboard

Cannot render video VAST containing the single quote characters

Open elq81hc opened this issue 9 months ago • 1 comments

Describe the bug We see the VAST content in the adm field of some demands contain the single quote character rather than the escape double quotes (\") that cause the VAST_REGEX cannot detect the VAST content in adm field. For example: { "id": "fa3a1f74-e945-432c-b16c-d924506e7771", "seatbid": [ { "bid": [ { "adm": "<VAST version='2.0'>..." } ], "seat": "1" } ], "cur": "USD" } Therefore, the adUnitIdentifierType is assigned to the value of AdFormat.INTERSTITIAL when checking in file PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/rendering/bidding/display/InterstitialController.java --> adUnitIdentifierType = bidResponse.isVideo() ? AdFormat.VAST : AdFormat.INTERSTITIAL;

The current regex to check if the content is vast: VAST_REGEX = "<VAST\\s.*version\\s*=\\s*\".*\"(\\s.*|)?>"; Is it correct if we add the single quotes to the above regex? Change it to VAST_REGEX = "<VAST\\s.*version\\s*=\\s*[\"'].*[\"'](\\s.*|)?>";

elq81hc avatar Apr 10 '25 07:04 elq81hc

hi @YuriyVelichkoPI , @ValentinPostindustria , please review if it is a bug

elq81hc avatar Apr 14 '25 02:04 elq81hc

Released in 3.0.1

mdanylov-sigma avatar May 12 '25 16:05 mdanylov-sigma