phlex 1.2.0 → 1.2.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: f1a287ded1bcdc949fef4ca4ae24eb7870a83f9eb90c02d1cdd04152e1606ea1
4
- data.tar.gz: 0aa47c95c2a46aacf2845f8bd58af88683b5283554c8f0e90d0199386505ef14
3
+ metadata.gz: d628d0e0b2f138923dd354f1b6b4ed47d7945d81bb95f8227978574d85d9a82f
4
+ data.tar.gz: 909df1cd689153a3ea83c7200d7af5c01aa1af0bba3a569eec825f3dc1b049f2
5
5
  SHA512:
6
- metadata.gz: 9cc696d354b00376956a4574c27f00851c3ad0b0598132dcb301cccf65a9b5d95cf35adc2032afb47b53ff9f52899090b3657113d4d8483e3d410efdf19478e0
7
- data.tar.gz: 9cd0b3c7a746f58faaf77bcd0502fb96721889622e6cc1bf0e7b9e2f97f859bb8562fd800609ee5d964f9b1cee39e31c2c66c72ff0fba93653c6d4fc6ac85bc4
6
+ metadata.gz: 78e83ee77668f41ed94742d45809f32a92ab8ecba22ea82ebdc2402d4ef52e2718ad157d723f730c2bc431ddc2f98749cdd5d5ed46b948bebf230c1cbf5adbe2
7
+ data.tar.gz: e234afec1c0a77095082136f870c326c8f15ff3c6fdc8b3369f7d034c6bbc053d6be245f5753b36b5d8a6bafcbbb100a3e562ed4968960a4ba902475dd6c8e07
data/lib/phlex/html.rb CHANGED
@@ -267,7 +267,7 @@ module Phlex
267
267
 
268
268
  # Like `capture` but the output is vanished into a BlackHole buffer.
269
269
  # Becuase the BlackHole does nothing with the output, this should be faster.
270
- def __vanish__(*args)
270
+ private def __vanish__(*args)
271
271
  return unless block_given?
272
272
 
273
273
  original_buffer = @_target
@@ -357,7 +357,11 @@ module Phlex
357
357
 
358
358
  private def __attributes__(**attributes)
359
359
  if attributes[:href]&.start_with?(/\s*javascript/)
360
- attributes[:href] = attributes[:href].sub(/^\s*(javascript:)+/, "")
360
+ attributes.delete(:href)
361
+ end
362
+
363
+ if attributes["href"]&.start_with?(/\s*javascript/)
364
+ attributes.delete("href")
361
365
  end
362
366
 
363
367
  buffer = +""
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.2.0"
4
+ VERSION = "1.2.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.2.0
4
+ version: 1.2.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-01-24 00:00:00.000000000 Z
11
+ date: 2023-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk