Inconsistencies with embedding and auto-linking URLs in posts

Created on 13 February 2024, 9 months ago
Updated 5 April 2024, 8 months ago

Problem/Motivation

There are inconsistencies with whitelisted embedding and auto-linking URLs in posts

Supported sources are:

Steps to reproduce

  • Login as an admin
  • Enable module Social Embed
  • Go to /admin/config/content/formats/manage/basic_html?destination=/admin/config/content/formats
  • Make sure that filter "Convert SUPPORTED URLs to URL embeds" is enabled
  • Login as SM+
  • Create a post with different links (whitelisted and not)
  • You should see that some not listed links are embed; some links shown as regular text

Proposed resolution

- For supported sources we need to make sure that the regular expression is working correctly and that also allows to embed these URL when they start with https, http etc( https://, http:// or www.facebook.com or facebook.com)
- For NOT supported sources (sources that are not in our list here https://github.com/goalgorilla/open_social/blob/main/modules/social_feat...) we should never embed anything and always display the URL as a link
- When I add several links after each other they should all behave as in the criteria above

Check code in SocialEmbedConvertUrlToEmbedFilter.php and fix incorrect behavior

πŸ› Bug report
Status

Fixed

Version

12.2

Component

Code (back-end)

Created by

πŸ‡ΊπŸ‡¦Ukraine luckie joe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024