phlex 1.7.0 → 1.7.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: 5c0002c77419906adab684bd6e3bcb0ad2d5b7084aeb4e62f89c4f15a1da6001
4
- data.tar.gz: dea42d460e9cce5f3a4001dbe5d6cbfd155f2bafe725ed0a21f3bfc9bb050a39
3
+ metadata.gz: 43c71026cecf29024dff9fd7d978bc25c5e4abadce4bef2c9a70f7e9f307d591
4
+ data.tar.gz: 627c81fc57dc871e8adeadf65246f68fbff2cc3f2c2c821a319b48a6f2795a00
5
5
  SHA512:
6
- metadata.gz: 22d4b19c21a14a60f8ff8cb2418bea2d553768b219cc9d491b44181580af17f4aeb804e0e4e0a875f959c74ab96b556f95fc5958e5ff4423f893cd7f07498a99
7
- data.tar.gz: 8512284569af79d553d74e16539292f1e68d10aad9224f0c1ec9698ef6d38c025bf20aa3a6c8b0db3533e21c03978980472d7c016148a9605e6fbf72caa0f0fe
6
+ metadata.gz: a2c1ce387522445186b6fddcb6669836ccb976effbd6605c97a93c84f3feb778f56811ca478eefca9945d7e8e26be9bce19df45a6dc99880bdb293d07145c9ca
7
+ data.tar.gz: b4894004ccadee3da6050cdd771090aa67dbbcfae8f5b9519e33ff11bb9dc89e11f81c30b62bb2502813b29faa5de862f136907cc77b5d60af2f8ad97bba155c
data/CHANGELOG.md CHANGED
@@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file. The format
19
19
  ### Removed
20
20
 
21
21
  - Removed the `menuitem` element as it's a deprecated HTML element.
22
+ - Removed the `SGML#text` method. This has been replaced with `SGML#plain`.
22
23
 
23
24
  ***
24
25
 
data/lib/phlex/sgml.rb CHANGED
@@ -389,8 +389,11 @@ module Phlex
389
389
  else raise ArgumentError, "Attribute keys should be Strings or Symbols."
390
390
  end
391
391
 
392
+ lower_name = name.downcase
393
+ next if lower_name == "href" && v.start_with?(/\s*javascript:/i)
394
+
392
395
  # Detect unsafe attribute names. Attribute names are considered unsafe if they match an event attribute or include unsafe characters.
393
- if HTML::EVENT_ATTRIBUTES[name] || name.match?(/[<>&"']/)
396
+ if HTML::EVENT_ATTRIBUTES[lower_name] || name.match?(/[<>&"']/)
394
397
  raise ArgumentError, "Unsafe attribute name detected: #{k}."
395
398
  end
396
399
 
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.7.0"
4
+ VERSION = "1.7.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.7.0
4
+ version: 1.7.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-04-18 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
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  - !ruby/object:Gem::Version
120
120
  version: '0'
121
121
  requirements: []
122
- rubygems_version: 3.4.10
122
+ rubygems_version: 3.4.22
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: A fun framework for building views in Ruby.