alchemy_cms 7.2.8 → 7.2.9
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/app/components/alchemy/admin/link_dialog/internal_tab.rb +2 -1
- data/app/components/alchemy/ingredients/link_view.rb +7 -1
- data/app/components/alchemy/ingredients/picture_view.rb +5 -2
- data/app/components/alchemy/ingredients/text_view.rb +4 -1
- data/app/components/concerns/alchemy/ingredients/link_target.rb +18 -0
- data/lib/alchemy/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca577f0e46713ddcda567834a14df89269d469c463d40b9ef45a94cb75c51d5c
|
4
|
+
data.tar.gz: 7f2697e309ebf31067618f09c84f6b41811bc3ea3764047e2d9cbb4a69c9e5d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4060445469483578207a2e432bf9b63c4729e47eeb21ea6cc43a1019f677b2e699b531dcf3d56515c8ec599185e5ce2859d87ac12410cc7b600ffee344e1f1a
|
7
|
+
data.tar.gz: 364bd7003f899d43e2f3ee5023f62f8c49be6c572af6c2730f98ca612345e56f5656423ae0b950513c19028734fed908a398a4e5e52cdacfb198c0d7cd0de9cf
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 7.2.9 (2025-03-17)
|
4
|
+
|
5
|
+
- [7.2-stable] Fix link dialog for links with url scheme mailto [#3205](https://github.com/AlchemyCMS/alchemy_cms/pull/3205) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
6
|
+
- [7.2-stable] CI: Use own script to check changes files [#3201](https://github.com/AlchemyCMS/alchemy_cms/pull/3201) ([tvdeyen](https://github.com/tvdeyen))
|
7
|
+
- [7.2-stable] Add rel="noopener noreferrer" to external links [#3184](https://github.com/AlchemyCMS/alchemy_cms/pull/3184) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
8
|
+
|
3
9
|
## 7.2.8 (2025-01-24)
|
4
10
|
|
5
11
|
- [7.2-stable] fix attribute sorting across Ruby versions [#3162](https://github.com/AlchemyCMS/alchemy_cms/pull/3162) ([alchemycms-bot](https://github.com/alchemycms-bot))
|
@@ -49,7 +49,8 @@ module Alchemy
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def page_attributes
|
52
|
-
|
52
|
+
# uri.path might be nil if the protocol is mailto: or a similar scheme that cannot have paths
|
53
|
+
locale, urlname, _fragment = uri.path&.match(PAGE_URL_PATTERN)&.captures
|
53
54
|
|
54
55
|
if locale && urlname.present?
|
55
56
|
{language_code: locale, urlname: urlname}
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Alchemy
|
2
2
|
module Ingredients
|
3
3
|
class LinkView < BaseView
|
4
|
+
include LinkTarget
|
5
|
+
|
4
6
|
attr_reader :link_text
|
5
7
|
|
6
8
|
# @param ingredient [Alchemy::Ingredient]
|
@@ -12,7 +14,11 @@ module Alchemy
|
|
12
14
|
end
|
13
15
|
|
14
16
|
def call
|
15
|
-
|
17
|
+
target = ingredient.link_target.presence
|
18
|
+
link_to(link_text, value, {
|
19
|
+
target: link_target_value(target),
|
20
|
+
rel: link_rel_value(target)
|
21
|
+
}.merge(html_options)).html_safe
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
@@ -4,6 +4,8 @@ module Alchemy
|
|
4
4
|
module Ingredients
|
5
5
|
# Renders a picture ingredient view
|
6
6
|
class PictureView < BaseView
|
7
|
+
include LinkTarget
|
8
|
+
|
7
9
|
attr_reader :ingredient,
|
8
10
|
:show_caption,
|
9
11
|
:disable_link,
|
@@ -46,10 +48,11 @@ module Alchemy
|
|
46
48
|
output = caption ? img_tag + caption : img_tag
|
47
49
|
|
48
50
|
if is_linked?
|
51
|
+
target = ingredient.link_target.presence
|
49
52
|
output = link_to(output, url_for(ingredient.link), {
|
50
53
|
title: ingredient.link_title.presence,
|
51
|
-
|
52
|
-
|
54
|
+
rel: link_rel_value(target),
|
55
|
+
target: link_target_value(target)
|
53
56
|
})
|
54
57
|
end
|
55
58
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Alchemy
|
2
2
|
module Ingredients
|
3
3
|
class TextView < BaseView
|
4
|
+
include LinkTarget
|
5
|
+
|
4
6
|
attr_reader :disable_link
|
5
7
|
|
6
8
|
delegate :dom_id, :link, :link_title, :link_target,
|
@@ -21,7 +23,8 @@ module Alchemy
|
|
21
23
|
link_to(value, url_for(link), {
|
22
24
|
id: dom_id.presence,
|
23
25
|
title: link_title,
|
24
|
-
target: link_target
|
26
|
+
target: link_target_value(link_target),
|
27
|
+
rel: link_rel_value(link_target)
|
25
28
|
}.merge(html_options))
|
26
29
|
end.html_safe
|
27
30
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Alchemy
|
2
|
+
module Ingredients
|
3
|
+
module LinkTarget
|
4
|
+
BLANK_VALUE = "_blank"
|
5
|
+
REL_VALUE = "noopener noreferrer"
|
6
|
+
|
7
|
+
def link_rel_value(target)
|
8
|
+
if link_target_value(target) == BLANK_VALUE
|
9
|
+
REL_VALUE
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def link_target_value(target)
|
14
|
+
(target == "blank") ? BLANK_VALUE : target
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/alchemy/version.rb
CHANGED
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.2.
|
4
|
+
version: 7.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
- Martin Meyerhoff
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2025-
|
15
|
+
date: 2025-03-17 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: actionmailer
|
@@ -806,6 +806,7 @@ files:
|
|
806
806
|
- app/components/alchemy/ingredients/select_view.rb
|
807
807
|
- app/components/alchemy/ingredients/text_view.rb
|
808
808
|
- app/components/alchemy/ingredients/video_view.rb
|
809
|
+
- app/components/concerns/alchemy/ingredients/link_target.rb
|
809
810
|
- app/controllers/alchemy/admin/attachments_controller.rb
|
810
811
|
- app/controllers/alchemy/admin/base_controller.rb
|
811
812
|
- app/controllers/alchemy/admin/clipboard_controller.rb
|
@@ -1431,7 +1432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1431
1432
|
version: '0'
|
1432
1433
|
requirements:
|
1433
1434
|
- ImageMagick (libmagick), v6.6 or greater.
|
1434
|
-
rubygems_version: 3.6.
|
1435
|
+
rubygems_version: 3.6.5
|
1435
1436
|
specification_version: 4
|
1436
1437
|
summary: A powerful, userfriendly and flexible CMS for Rails
|
1437
1438
|
test_files: []
|