Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b25a5839b0 | ||
|
|
c4609f4370 | ||
|
|
2c94ba4379 | ||
|
|
065bd0a86a |
Generated
+1
-1
@@ -2948,7 +2948,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "portal"
|
||||
version = "0.3.28"
|
||||
version = "0.3.30"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "portal"
|
||||
version = "0.3.29"
|
||||
version = "0.3.31"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
|
||||
@@ -191,6 +191,7 @@ pub fn render_inline_markdown(text: &str) -> String {
|
||||
Event::Start(Tag::Link { dest_url, .. })
|
||||
if !(dest_url.starts_with("https://")
|
||||
|| dest_url.starts_with("mailto:")
|
||||
|| dest_url.starts_with("tel:")
|
||||
|| dest_url.starts_with('/')) =>
|
||||
{
|
||||
in_link += 1;
|
||||
@@ -2146,6 +2147,10 @@ alternatives:
|
||||
fn markdown_drops_html_and_unsafe_links() {
|
||||
assert_eq!(render_inline_markdown("x <script>y</script> z"), "x y z");
|
||||
assert_eq!(render_inline_markdown("[bad](javascript:alert(1))"), "bad");
|
||||
assert_eq!(
|
||||
render_inline_markdown("[ring](tel:+4791180485)"),
|
||||
"<a href=\"tel:+4791180485\">ring</a>"
|
||||
);
|
||||
assert_eq!(
|
||||
render_inline_markdown(""),
|
||||
"<img src=\"https://x.no/a.jpg\" alt=\"site\" />"
|
||||
|
||||
+6
-2
@@ -368,8 +368,12 @@ main.not-found {
|
||||
.alt-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-height: 14rem;
|
||||
object-fit: cover;
|
||||
height: auto;
|
||||
/* Natural aspect, not a cropped band; a very tall image is still
|
||||
bounded so it can't tower. The deck below overrides for its
|
||||
fixed-height cards. */
|
||||
max-height: 32rem;
|
||||
object-fit: contain;
|
||||
border-radius: calc(var(--radius) - 0.3rem);
|
||||
margin-bottom: 1.1rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user