alchemy_cms 7.4.12 → 7.4.13

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: f1ae4fb256e37c47ac4c8b4c07355a96e51063cf95da20cfb6f7a4dea8656f53
4
- data.tar.gz: ad01584281aa3668cedaa30a826ec81a8d2df6abadf07d678d06870c0a08193e
3
+ metadata.gz: 27f806a1a21492486b1f8bc57ecb2d38c23064f6bf39b489426b1f916b244165
4
+ data.tar.gz: cdd3d19162be0606e8d8a91b00a2ee207670c8dd1065e9a886b832295316b4c8
5
5
  SHA512:
6
- metadata.gz: f963091d40b340a546c88362172a2cfaa95376a9a02322dfda7c67517db30aa2ba175ce186ea34a32e50a5a9e196c87674f9308cd5e95430527fc7d7c2525500
7
- data.tar.gz: 757c13ea1763565039c49f16a6084181113dda9ae8392d66e6e8b9dda14afc1549d72eb8918d905b82221902b782858b7ad51a98040cda888e96200d812593f4
6
+ metadata.gz: 8e6605933d4e61657bb83dad115f4c29ab676c6eae1df863af973deddedb4c289d8b8b45358b9880aba5ff14b8d73a89a48d9dabc65a721a760c96e3d0d4ce5f
7
+ data.tar.gz: 90cd853afa25f55975d091f57d7c1d4a769f2f6b2ed12a31b201f9d2038f8ab7507b8a046d8e62cce8b81820beea07a60c33c8946c6d2c93f7c1b0713281b250
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.4.13 (2026-02-17)
4
+
5
+ ## What's Changed
6
+ * [7.4-stable] fix(LinkDialog): Fix anchor regex to handle hyphens in URL fragments by @alchemycms-bot[bot] in https://github.com/AlchemyCMS/alchemy_cms/pull/3684
7
+
8
+
9
+ **Full Changelog**: https://github.com/AlchemyCMS/alchemy_cms/compare/v7.4.12...v7.4.13
10
+
3
11
  ## 7.4.12 (2026-01-19)
4
12
 
5
13
  ## What's Changed
@@ -103,7 +103,7 @@ module Alchemy
103
103
  action_controller = url.gsub(/\A\//, "").split("/")
104
104
  [
105
105
  action_controller.last.to_sym,
106
- action_controller[0..action_controller.length - 2].join("_").to_sym
106
+ action_controller[0..-2].join("_").to_sym
107
107
  ]
108
108
  end
109
109
  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(/#\w+$/, "") + elementAnchor.value
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()
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.4.12"
4
+ VERSION = "7.4.13"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.12
4
+ version: 7.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen