alchemy_cms 8.0.7 → 8.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87358a40de239f76556ffb7370914b6f3b5d348473a4fb1aa48612cb8bcabcab
|
|
4
|
+
data.tar.gz: ed7ba55ca85055370e4b150ce895825dbc50803bcbade1fadaa61853d5b0ba5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6cdbe57047497c1733e6a9578b94a5cd177a013224cc76ad7943bff295d31f1bb98c18e3d6abc278cf9639e787042f7eb0f2dcb44924f0c6fa8aeaaf9289155
|
|
7
|
+
data.tar.gz: 0f45f1308033bab806950f8957c230f60dfa31ccab6da96047c0b93bdafb35b50cd9c9c0364f6c2e48124b5d637d90e9f6bb5da46088addd7731d5544c1d0718
|
|
@@ -106,7 +106,7 @@ module Alchemy
|
|
|
106
106
|
action_controller = url.delete_prefix("/").split("/")
|
|
107
107
|
[
|
|
108
108
|
action_controller.last.to_sym,
|
|
109
|
-
action_controller[0
|
|
109
|
+
action_controller[0..-2].join("_").to_sym
|
|
110
110
|
]
|
|
111
111
|
end
|
|
112
112
|
end
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { translate } from "alchemy_admin/i18n"
|
|
2
2
|
import { Dialog } from "alchemy_admin/dialog"
|
|
3
3
|
|
|
4
|
+
// Matches a URL fragment (#anchor) at the end of a string.
|
|
5
|
+
// Covers RFC 3986 unreserved characters (ALPHA, DIGIT, "-", ".", "_", "~")
|
|
6
|
+
// which are the characters valid in URL fragments and common in DOM element IDs.
|
|
7
|
+
const ANCHOR_REGEX = /#[\w.~-]+$/
|
|
8
|
+
|
|
4
9
|
// Represents the link Dialog that appears, if a user clicks the link buttons
|
|
5
10
|
// in TinyMCE or on an Ingredient that has links enabled (e.g. Picture)
|
|
6
11
|
//
|
|
@@ -103,7 +108,7 @@ export class LinkDialog extends Dialog {
|
|
|
103
108
|
|
|
104
109
|
if (linkType === "internal" && elementAnchor.value !== "") {
|
|
105
110
|
// remove possible fragments on the url and attach the fragment (which contains the #)
|
|
106
|
-
url = url.replace(
|
|
111
|
+
url = url.replace(ANCHOR_REGEX, "") + elementAnchor.value
|
|
107
112
|
} else if (linkType === "external" && !url.match(Alchemy.link_url_regexp)) {
|
|
108
113
|
// show validation error and prevent link creation
|
|
109
114
|
this.#showValidationError()
|
data/lib/alchemy/version.rb
CHANGED