Skip to content

Commit

Permalink
RNMobile: Detect and avoid invalid media URLs in VideoPress v5 block (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Siobhan Bamber authored Feb 27, 2024
1 parent 7b9aec0 commit 7194ccb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

RNMobile: Detect and avoid invalid media URLs in VideoPress v5 block
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class VideoPressEdit extends Component {
onSelectURL( url ) {
const { createErrorNotice, setAttributes, onReplace } = this.props;

if ( isURL( url ) ) {
if ( isURL( url ) && /^https?:/.test( getProtocol( url ) ) ) {
// Check if there's an embed block that handles this URL.
const embedBlock = createVideoPressEmbedBlock( {
attributes: { url },
Expand Down

0 comments on commit 7194ccb

Please sign in to comment.