{"result":{"depiction_url":null,"edges":{"references":{"objects":[{"created":"2020-05-30T05:47:37Z","object_id":{"id":1274,"is_a":["text","documentation","developerguide"],"name":"doc_developerguide_notifications","title":{"_type":"trans","tr":{"en":"Respond to a notification"}},"uri":"https:\/\/zotonic.com\/id\/1274"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"subject":{"objects":[{"created":"2026-09-09T13:47:38Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:38Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-09-09T13:47:38Z","object_id":{"id":2627,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_notification","title":"Notification","uri":"https:\/\/zotonic.com\/id\/2627"},"seq":3},{"created":"2026-09-09T13:47:38Z","object_id":{"id":2667,"is_a":["categorization","keyword","keyword_data_type"],"name":"zotonic_topic_url","title":"URL","uri":"https:\/\/zotonic.com\/id\/2667"},"seq":4},{"created":"2026-09-09T13:47:38Z","object_id":{"id":2672,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_html","title":"HTML","uri":"https:\/\/zotonic.com\/id\/2672"},"seq":5},{"created":"2026-09-09T13:47:38Z","object_id":{"id":2685,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_security","title":"Security","uri":"https:\/\/zotonic.com\/id\/2685"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1807,"is_a":["text","documentation","reference","notification"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1807"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_notification_sanitize_embed_url","page_url":{"en":"https:\/\/zotonic.com\/docs\/1807\/observe_sanitize_embed_url-2","x-default":"https:\/\/zotonic.com\/docs\/1807\/observe_sanitize_embed_url-2"},"preview_url":null,"resource":{"version":4054,"pivot_location_lat":null,"title":"observe_sanitize_embed_url\/2","is_authoritative":true,"body":"<p>Sanitize an embed url. The hostpart is of the format: <code>&lt;&lt;&quot;youtube.com\/v...&quot;&gt;&gt;<\/code>.<\/p>\n<p>Type:<\/p>\n<p><a href=\"\/id\/doc_developerguide_notifications#notification-first\">first<\/a><\/p>\n<p>Return:<\/p>\n<p><code>undefined<\/code>, <code>false<\/code> or a binary with a acceptable hostpath<\/p>\n<p><code>#sanitize_embed_url{}<\/code> properties:<\/p>\n<ul><li>hostpath: <code>binary<\/code><\/li><\/ul>\n<p>This notification is used to sanitize <em>embed urls<\/em> passed with the media import routines.<\/p>\n<p>Example usage in a module, where URLs from some public broadcasters are allowed:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">-export([\n    observe_sanitize_embed_url\/2\n]).\n\nobserve_sanitize_embed_url(#sanitize_embed_url{hostpath= &lt;&lt;&quot;media.vara.nl\/&quot;, _\/binary&gt;&gt; = Url}, _Context) -&gt;\n    Url;\nobserve_sanitize_embed_url(#sanitize_embed_url{hostpath= &lt;&lt;&quot;biografie.vara.nl\/&quot;, _\/binary&gt;&gt; = Url}, _Context) -&gt;\n    Url;\nobserve_sanitize_embed_url(#sanitize_embed_url{hostpath= &lt;&lt;&quot;js.vpro.nl\/&quot;, _\/binary&gt;&gt; = Url}, _Context) -&gt;\n    Url;\nobserve_sanitize_embed_url(#sanitize_embed_url{hostpath= &lt;&lt;&quot;embed.vpro.nl\/&quot;, _\/binary&gt;&gt; = Url}, _Context) -&gt;\n    Url;\nobserve_sanitize_embed_url(_, _Context) -&gt;\n    undefined.\n<\/code><\/pre>\n<p>Note the <code>undefined<\/code> returned if no other patterns match. This allows other modules to check for different patterns.<\/p>","slug":"observe_sanitize_embed_url-2","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"9ff030079e55e2b2da686bd389e76e066845d9cb286c4a68cb713c439cf453c9","is_featured":false,"notification":{"arity":2,"callbacks":[{"arity":2,"name":"observe_sanitize_embed_url","signature":"observe_sanitize_embed_url\/2","variation":"observe"}],"name":"sanitize_embed_url","record":{"hostpath":"undefined"}},"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":1122,"is_a":["meta","category"],"name":"notification","title":"Notifications","uri":"https:\/\/test.zotonic.com\/id\/1122"},"doc_source_path":"apps\/zotonic_core\/src\/behaviours\/zotonic_observer.erl","publication_start":"2023-06-24T08:17:45Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_core\/src\/behaviours\/zotonic_observer.erl","pivot_location_lng":null,"doc_source_kind":"notification","name":"doc_notification_sanitize_embed_url","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:37Z","uri":null,"doc_status":"current","is_dependent":false,"publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"c34f80c7ab6700e5d77ac5730deaae0e4710e159\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-19T13:18:11Z","title_slug":"observe_sanitize_embed_url-2"},"uri":"https:\/\/zotonic.com\/id\/1807","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1807"}},"status":"ok"}