diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 8150ef86e..9c3bef51d 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -136,8 +136,7 @@ (let [{:keys [selection-start selection-end format selection value edit-id input]} m cur-pos (cursor/pos input) empty-selection? (= selection-start selection-end) - selection-link? (and selection (or (util/starts-with? selection "http://") - (util/starts-with? selection "https://"))) + selection-link? (and selection (gp-util/url? selection)) [content forward-pos] (cond empty-selection? (config/get-empty-link-and-forward-pos format)