You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we look at that regular expression, it basically boils down to something like:
<snip> [^"]*.(jpg|png|pdf <snip> ) <snip>
That dot/period looks suspicious - why do we care that there is at least one character before the file extension?
I am guessing that the intention there was to match a literal dot (as in .png) and not "any character" (as in *png), in which case it should have been escaped like \. (but should be escaped twice in that string:\\.).
In general, that code looks like it works, but it also matches things like https://somesite.com/amazing-blog-about-png. This leads to errors later on, in my case something like so (I still don't fully understand the reason behind error, but the regex fix should fix it):
The text was updated successfully, but these errors were encountered:
wordpress-importer/src/migration.js
Line 120 in 141c99d
If we look at that regular expression, it basically boils down to something like:
That dot/period looks suspicious - why do we care that there is at least one character before the file extension?
I am guessing that the intention there was to match a literal dot (as in
.png
) and not "any character" (as in*png
), in which case it should have been escaped like\.
(but should be escaped twice in that string:\\.
).In general, that code looks like it works, but it also matches things like
https://somesite.com/amazing-blog-about-png
. This leads to errors later on, in my case something like so (I still don't fully understand the reason behind error, but the regex fix should fix it):The text was updated successfully, but these errors were encountered: