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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b68a563745c2782c8fa9f864f1d00994d6f5b3b1ffb92d651a52875386587fb
4
- data.tar.gz: 4e272a581c83f91a4ba0e0a382bb2f54f3c7b3918e88b6c232d503f407046e75
3
+ metadata.gz: 9a0ead9c6e98f79b9f6b71e897a3b7dd2a8be8c68b36c1ead9c4c7ac9d4a93af
4
+ data.tar.gz: 51af9dc212b8d5f142c9e607bd0a4a6342cc84b18b59252f4986b394e530f495
5
5
  SHA512:
6
- metadata.gz: 4db12efca6e80561f266b3118a401bb81c2859a5b6b4f3f6db301ea711c468b1ad426a59db9dc0e9ea02056e60e7c325223051dd2e4a2309dc14d1ffc45410ac
7
- data.tar.gz: 7c6fe13e7fa6e88d4c1857d4746faae3b622586823cfe6e64a71706efa9aca7ed1e82c9c13f5916f1c6780ab914d6a3576d4cd8571df0df249767bbf0c3b86de
6
+ metadata.gz: 0703ddfddfca1a573f1883918c8e9f24c928b10c7305d477a8542e5ddac2d1debeb5a38617cfd7d6163a8ee94511395898fad17c78da54222ccdf231c1758fc0
7
+ data.tar.gz: 6f2451edb1ecb37979c93e660364bdb3312d145a3a7a961b1c263cf927804ebf9501d5b503b082f1fd9973eba7ddefb55543a0308af328ef3aad987fb15adbdc
data/Gemfile CHANGED
@@ -9,7 +9,7 @@ gem "rubocop"
9
9
  gem "sus"
10
10
  gem "benchmark-ips"
11
11
  gem "yard"
12
- gem "green_dots", github: "joeldrapper/green_dots"
12
+ # gem "green_dots", github: "joeldrapper/green_dots"
13
13
 
14
14
  group :test do
15
15
  gem "i18n"
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[name] || name.match?(/[<>&"']/)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Phlex
4
- VERSION = "1.9.0"
4
+ VERSION = "1.9.1"
5
5
  end
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.0
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: 2023-11-24 00:00:00.000000000 Z
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.10
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.