alchemy_cms 8.1.2 → 8.1.3

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: 2dba164cab2525eb7f9b3b797044db142baad7bb29050f915cc9a9c98f2a977f
4
- data.tar.gz: 1ecd7cf9aa2d04c2351ac010a45cf1c6595e93d407fd4954596d1b70ae680846
3
+ metadata.gz: 11b798cade102760ef17a76e056d0d52096dbf71924d50b06ba74e4a30d4d21e
4
+ data.tar.gz: 965679082089dd8a7104fb6ed1006d75e25872a4c37d3d904d3ae90d65c4fa75
5
5
  SHA512:
6
- metadata.gz: ee92b93794524b3f8a2a09f9d8ef060f48d7689cf3b3faade0191a0866e008ba908e0ee7cc2591a825c8dfea1e51c2f2b8f53504d36a95f1f1585b88c20d9334
7
- data.tar.gz: a238c2d4596dc2835ad01048941fd492ddc053be741eb987d6114a89d59dd0ddac637fbcea012a136d5ad14ed4c06d6bd7e7e1481914288e20c530dcdf4fa0a3
6
+ metadata.gz: e37eae499c9f693ee854ed1318ffefefae50123e294e6f09410e39feee41fa78ca68e77a8c2b7b68254510281ac9abb8a4ae73e59295a74855a15f3cfc5d058f
7
+ data.tar.gz: cfc4fc0ceb1b419c41c9129e8801205ca1f607ba6ddcc9446c8b792170848815b2c3ca7d300168192cbf728388c613373790e37f34fcd1db790dbdb0f60c5130
@@ -110,7 +110,7 @@ module Alchemy
110
110
  action_controller = url.delete_prefix("/").split("/")
111
111
  [
112
112
  action_controller.last.to_sym,
113
- action_controller[0..action_controller.length - 2].join("_").to_sym
113
+ action_controller[0..-2].join("_").to_sym
114
114
  ]
115
115
  end
116
116
  end
@@ -178,7 +178,7 @@ module Alchemy
178
178
  content = "#{icon} #{content}".html_safe
179
179
  end
180
180
 
181
- if ingredient.has_validations?
181
+ if presence_validation?
182
182
  "#{content}<span class='validation_indicator'>*</span>".html_safe
183
183
  else
184
184
  content
@@ -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 = "8.1.2"
4
+ VERSION = "8.1.3"
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: 8.1.2
4
+ version: 8.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen