fix: Escape regex for embeds (#3907)

Fixes #3899
This commit is contained in:
Apoorv Mishra
2022-08-02 14:10:11 +05:30
committed by GitHub
parent 00481d2bfc
commit 294521f162
56 changed files with 256 additions and 29 deletions

View File

@@ -2,7 +2,7 @@ import * as React from "react";
import Frame from "../components/Frame";
import { EmbedProps as Props } from ".";
const URL_REGEX = /^https?:\/\/whimsical.com\/[0-9a-zA-Z-_~]*-([a-zA-Z0-9]+)\/?$/;
const URL_REGEX = /^https?:\/\/whimsical\.com\/[0-9a-zA-Z-_~]*-([a-zA-Z0-9]+)\/?$/;
export default class Whimsical extends React.Component<Props> {
static ENABLED = [URL_REGEX];