Skip to content

Commit

Permalink
Merge branch 'release/1.1.0-alpha.31'
Browse files Browse the repository at this point in the history
  • Loading branch information
nekofar committed Sep 26, 2024
2 parents 751fdef + 0f603d1 commit 524273e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,5 @@ dist
.yarn/install-state.gz
.pnp.*

# Cloudflare
.wrangler/
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file.

## [1.1.0-alpha.31] - 2024-09-26

### Features

- Encode app URLs with percent encoding

### Miscellaneous Tasks

- Add `.wrangler` to `.gitignore`

## [1.1.0-alpha.30] - 2024-09-26

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lilnouns-click"
version = "1.1.0-alpha.30"
version = "1.1.0-alpha.31"
authors = ["Milad Nekofar <milad@nekofar.com>"]
edition = "2021"
description = "A Nounish URL shortener for LilNouns DAO."
Expand Down
3 changes: 3 additions & 0 deletions src/routes.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use html_escape::encode_safe;
use html_minifier::minify;
use percent_encoding::{percent_encode, utf8_percent_encode, NON_ALPHANUMERIC};

Check warning on line 3 in src/routes.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unused import: `percent_encode`

Check warning on line 3 in src/routes.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unused import: `percent_encode`
use serde::{Deserialize, Serialize};
use serde_json::json;
use sqids::Sqids;
Expand Down Expand Up @@ -122,6 +123,8 @@ pub async fn handle_redirect<D>(req: Request, ctx: RouteContext<D>) -> worker::R
.as_str()
.replace(sqid, format!("app/{}", sqid).as_str());

let mini_app_url = utf8_percent_encode(&mini_app_url, NON_ALPHANUMERIC).to_string();

let html_doc = format!(
r#"
<!DOCTYPE html>
Expand Down

0 comments on commit 524273e

Please sign in to comment.