adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
723 stars 737 forks source link

OEmbed Example Configs incorrectly escaping . #2801

Open HitmanInWis opened 5 days ago

HitmanInWis commented 5 days ago

Version: 2.25.5-SNAPSHOT

A few of the example OEmbed configs are incorrectly escaping the . in the scheme regex:

com.adobe.cq.wcm.core.components.internal.services.embed.OEmbedClientImplConfigurationFactory-flickr.config

scheme=["https?://.*\.flickr\\.com/photos/.*","https?://flic\\.kr/p/.*"]

should be

scheme=["https?://.*\\.flickr\\.com/photos/.*","https?://flic\\.kr/p/.*"]

com.adobe.cq.wcm.core.components.internal.services.embed.OEmbedClientImplConfigurationFactory-twitter.config

scheme=["https?://(.*\.)?twitter\.com/.*"]

should be

scheme=["https?://(.*\\.)?twitter\\.com/.*"]

com.adobe.cq.wcm.core.components.internal.services.embed.OEmbedClientImplConfigurationFactory-youtube.config

scheme=["https://.*\.youtube.com/watch.*","https://.*\.youtube.com/v/.*","https://youtu\.be/.*"]

should be

scheme=["https://.*\\.youtube.com/watch.*","https://.*\\.youtube.com/v/.*","https://youtu\\.be/.*"]
kwin commented 5 days ago

I would recommend switching to .cfg.json serialization format, as it has simpler escaping rules and is the native format for Sling Feature Models (and meanwhile also properly supported in AEM 6.5)