Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/browser/qml/pages/components/BookmarkEditDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ UserPromptDialog {
if (!errorHighlight) {
return ""
} else if (text.length > 0) {
var scheme = root.url.match(/^(https?):\/\/.+/)
var scheme = root.url.match(/^([^:]{3,}):/)

//% "URL scheme (%1) missing"
//% "URL scheme (%1) missing or not supported"
return qsTrId("sailfish_browser-la-missing_url_scheme").arg(scheme && scheme.length > 1
? scheme[1] : "https")
} else {
Expand All @@ -112,7 +112,7 @@ UserPromptDialog {
EnterKey.onClicked: accept()

validator: RegExpValidator {
regExp: /^https?:\/\/.+/
regExp: /^(file|https?):\/\/.+/
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions apps/browser/qml/pages/components/BookmarkItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ ListItem {
}
MenuItem {
text: qsTrId("sailfish_browser-me-add_to_launcher")
// Should match up with .desktop mime-types. See also BookmarkEditDialog.qml
enabled: /^https?:\/\/.+/.test(url)
|| /^file:\/\/.+\.(xml|html?)$/.test(url)
onClicked: pageStack.animatorPush("AddToAppGridDialog.qml",
{
"url": url,
Expand Down