Skip to content

Cannot render video VAST containing the single quote characters #853

Closed
@elq81hc

Description

@elq81hc

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.*|)?>";

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions