phlex 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of phlex might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/phlex/sgml.rb +4 -9
- data/lib/phlex/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a0ead9c6e98f79b9f6b71e897a3b7dd2a8be8c68b36c1ead9c4c7ac9d4a93af
|
4
|
+
data.tar.gz: 51af9dc212b8d5f142c9e607bd0a4a6342cc84b18b59252f4986b394e530f495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0703ddfddfca1a573f1883918c8e9f24c928b10c7305d477a8542e5ddac2d1debeb5a38617cfd7d6163a8ee94511395898fad17c78da54222ccdf231c1758fc0
|
7
|
+
data.tar.gz: 6f2451edb1ecb37979c93e660364bdb3312d145a3a7a961b1c263cf927804ebf9501d5b503b082f1fd9973eba7ddefb55543a0308af328ef3aad987fb15adbdc
|
data/Gemfile
CHANGED
data/lib/phlex/sgml.rb
CHANGED
@@ -366,14 +366,6 @@ module Phlex
|
|
366
366
|
attributes = process_attributes(**attributes)
|
367
367
|
end
|
368
368
|
|
369
|
-
if attributes[:href]&.start_with?(/\s*javascript:/)
|
370
|
-
attributes.delete(:href)
|
371
|
-
end
|
372
|
-
|
373
|
-
if attributes["href"]&.start_with?(/\s*javascript:/)
|
374
|
-
attributes.delete("href")
|
375
|
-
end
|
376
|
-
|
377
369
|
buffer = +""
|
378
370
|
__build_attributes__(attributes, buffer: buffer)
|
379
371
|
|
@@ -391,8 +383,11 @@ module Phlex
|
|
391
383
|
else raise ArgumentError, "Attribute keys should be Strings or Symbols."
|
392
384
|
end
|
393
385
|
|
386
|
+
lower_name = name.downcase
|
387
|
+
next if lower_name == "href" && v.start_with?(/\s*javascript:/i)
|
388
|
+
|
394
389
|
# Detect unsafe attribute names. Attribute names are considered unsafe if they match an event attribute or include unsafe characters.
|
395
|
-
if HTML::EVENT_ATTRIBUTES[
|
390
|
+
if HTML::EVENT_ATTRIBUTES[lower_name] || name.match?(/[<>&"']/)
|
396
391
|
raise ArgumentError, "Unsafe attribute name detected: #{k}."
|
397
392
|
end
|
398
393
|
|
data/lib/phlex/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Drapper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
|
-
rubygems_version: 3.4.
|
125
|
+
rubygems_version: 3.4.22
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: A fun framework for building views in Ruby.
|