Skip to content

Commit

Permalink
release: Prepare 0.11.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
stephannv committed Oct 14, 2024
1 parent 2192bba commit d55b923
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,51 @@

All notable changes to this project will be documented on <https://stephannv.github.io/blueprint-docs/>.

# [0.11.0] - 2024-10-11

### Add `escape_once` helper

It escapes HTML without affecting existing escaped entities
```crystal
class ExamplePage
include Blueprint::HTML
def blueprint
plain escape_once("1 < 2 &amp; 3")
span escape_once("&lt;&lt; Accept & Checkout")
span { escape_once("<script>alert('content')</script>") }
end
end
puts ExamplePage.new.to_s
```

Output:
```html
1 &lt; 2 &amp; 3

<span>&lt;&lt; Accept &amp; Checkout</span>

<span>&lt;script&gt;alert(&#39;content&#39;)&lt;/script&gt;</span>
```

### Change attribute value escaper
Before attribute values were escaped using `HTML.escape`, now the escape is done using `.gsub('"', "&quot;")`.

```crystal
class ExamplePage
include Blueprint::HTML
def blueprint
input(value: %(>'test'<">))
# Before <input value="&gt;&#39;test&#39;&lt;&quot;&gt;">
# After <input value=">'test'<&quot;>">
end
end
```

# [0.10.0] - 2024-10-11

### Allow any type `#plain`/`#comment` methods
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: blueprint
description: |
A lib for writing reusable and testable views templates (HTML, SVG, Forms) in plain Crystal. Inspired by Phlex.
version: 0.10.0
version: 0.11.0

authors:
- Stephann V. <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/blueprint/version.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Blueprint
VERSION = "0.10.0"
VERSION = "0.11.0"
end

0 comments on commit d55b923

Please sign in to comment.