zentrick / iab-vast-parser

Parses IAB VAST tags into iab-vast-model objects.
MIT License
23 stars 6 forks source link

Handle empty <Duration> #59

Closed timdp closed 4 years ago

timdp commented 5 years ago

We currently throw if a <Duration> element does not contain a valid time string.

This PR relaxes that into returning null, but the work is unfinished.

Given that <Duration> is a required element, an invalid duration string makes the VAST invalid, so throwing is still the correct behavior. However, we have limited support for "loose mode". We should still throw in strict mode.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.02%) to 95.327% when pulling 3d03ba7646d655e638287107f6d14949dafb3f8f on handle-empty-duration into f87cb34faebe2e5eab0a6bf4886c2c408a0c9d26 on master.

timdp commented 4 years ago

Postponing the work for strict mode and merging as-is.