Problem/Motivation
Validation Regexp fails if title has "." in the text
Steps to reproduce
If validation is working (see issue https://www.drupal.org/project/media_entity_flickr/issues/3216437), and you try to create a Flicker entity from a Flickr photo that has a "." in the title, it will be rejected as invalid. eg:
<a data-flickr-embed="true" href="https://www.flickr.com/photos/hoting2000/42633796482/" title="c. 1927 Over Kaitak airport"><img src="https://live.staticflickr.com/1735/42633796482_96ea80492a_o.jpg" width="1245" height="770" alt="c. 1927 Over Kaitak airport"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
Proposed resolution
The problem is in the $validationRegexp strings in Flickr.php. To fix it, change the title section of both strings from:
title=\"(?P<title>[^.*]+)\"
to:
title=\"(?P<title>[^\"]+)\"
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | After-appling-patch.png | 81.97 KB | anandhi karnan |
Comments
Comment #2
anandhi karnan commentedHi,
The patch from 3216437 which is being resolved the title validation issue on flickr embed code.
Thanks