mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix forwarded email subject being treated as an URL, for example "Fwd: subject"
This commit is contained in:
parent
b891e547c9
commit
3841734deb
1 changed files with 3 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ import {
|
|||
} from '../generated/graphql'
|
||||
import { CreateArticlesSuccessPartial } from '../resolvers'
|
||||
import { Claims, WithDataSourcesContext } from '../resolvers/types'
|
||||
import { validateUrl } from '../services/create_page_save_request'
|
||||
import { Merge } from '../util'
|
||||
|
||||
interface InputObject {
|
||||
|
|
@ -292,9 +293,10 @@ export const unescapeHtml = (html: string): string => {
|
|||
|
||||
export const isUrl = (str: string): boolean => {
|
||||
try {
|
||||
new URL(str)
|
||||
validateUrl(str)
|
||||
return true
|
||||
} catch {
|
||||
console.log('not an url', str)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue