Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: Prepare 0.11.0 release #85

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading