Browse Source

Add Pinterest embed support

- resolves #5471
Dharma-09 3 years ago
parent
commit
d0133d5fce
4 changed files with 13 additions and 0 deletions
  1. 1 0
      CHANGELOG.txt
  2. 1 0
      CONTRIBUTORS.rst
  3. 1 0
      docs/releases/2.17.md
  4. 10 0
      wagtail/embeds/oembed_providers.py

+ 1 - 0
CHANGELOG.txt

@@ -27,6 +27,7 @@ Changelog
  * Update `README.md` logo to work for GitHub dark mode (Paarth Agarwal)
  * Avoid an unnecessary page reload when pressing enter within the header search bar (Images, Pages, Documents) (Riley de Mestre)
  * Removed unofficial length parameter on `If-Modified-Since` header in `sendfile_streaming_backend` which was only used by IE (Mariusz Felisiak)
+ * Add Pinterest support to the list of default oEmbed providers (Dharmik Gangani)
  * Fix: When using `simple_translations` ensure that the user is redirected to the page edit view when submitting for a single locale (Mitchel Cabuloy)
  * Fix: When previewing unsaved changes to `Form` pages, ensure that all added fields are correctly shown in the preview (Joshua Munn)
  * Fix: When Documents (e.g. PDFs) have been configured to be served inline via `WAGTAILDOCS_CONTENT_TYPES` & `WAGTAILDOCS_INLINE_CONTENT_TYPES` ensure that the filename is correctly set in the `Content-Disposition` header so that saving the files will use the correct filename (John-Scott Atlakson)

+ 1 - 0
CONTRIBUTORS.rst

@@ -572,6 +572,7 @@ Contributors
 * Vibhakar Solanki
 * Riley de Mestre
 * Mariusz Felisiak
+* Dharmik Gangani
 
 Translators
 ===========

+ 1 - 0
docs/releases/2.17.md

@@ -52,6 +52,7 @@ The panel types `StreamFieldPanel`, `RichTextFieldPanel`, `ImageChooserPanel`, `
  * Update `README.md` logo to work for GitHub dark mode (Paarth Agarwal)
  * Avoid an unnecessary page reload when pressing enter within the header search bar (Images, Pages, Documents) (Riley de Mestre)
  * Removed unofficial length parameter on `If-Modified-Since` header in `sendfile_streaming_backend` which was only used by IE (Mariusz Felisiak)
+ * Add Pinterest support to the list of default oEmbed providers (Dharmik Gangani)
 
 
 ### Bug fixes

+ 10 - 0
wagtail/embeds/oembed_providers.py

@@ -141,6 +141,15 @@ clickthrough = {
     ],
 }
 
+pinterest = {
+    "endpoint": "https://www.pinterest.com/oembed.json",
+    "urls": [
+        r"^https?://[-\w]+\.pinterest\.com\.?[a-z]*/.+$",
+        r"^https?://in\.pinterest\.com/.+$",
+        r"^https?://pin\.it/.+$",
+    ],
+}
+
 kinomap = {
     "endpoint": "https://www.kinomap.com/oembed",
     "urls": [
@@ -725,4 +734,5 @@ all_providers = [
     vidyard,
     reddit,
     tidal,
+    pinterest,
 ]