diff --git a/ImageBoardServerApp/Shared/Components/Comment.razor b/ImageBoardServerApp/Shared/Components/Comment.razor
index e059919..41df06a 100644
--- a/ImageBoardServerApp/Shared/Components/Comment.razor
+++ b/ImageBoardServerApp/Shared/Components/Comment.razor
@@ -71,9 +71,15 @@
}
else
{
-
- @line
-
+ @if (line.StartsWith("https://") || line.StartsWith("http://"))
+ {
+ @line
+ }
+ else
+ {
+ @line
+ }
+
}
}
diff --git a/ImageBoardServerApp/Shared/Components/Post.razor b/ImageBoardServerApp/Shared/Components/Post.razor
index 04ed894..f351583 100644
--- a/ImageBoardServerApp/Shared/Components/Post.razor
+++ b/ImageBoardServerApp/Shared/Components/Post.razor
@@ -57,7 +57,19 @@
{
className = "greenText";
}
- @s
+ @foreach (string s2 in s.Split(" "))
+ {
+ @if (s2.StartsWith("https://") || s.StartsWith("http://"))
+ {
+ @s2
+ }
+ else
+ {
+ @s2
+ }
+
+ }
+
}
@if (post.Content.Split("\n").Length > 6)
{
@@ -74,7 +86,19 @@
{
className = "greenText";
}
- @s
+ @foreach (string s2 in s.Split(" "))
+ {
+ @if (s2.StartsWith("https://") || s2.StartsWith("http://"))
+ {
+ @s2
+ }
+ else
+ {
+ @s2
+ }
+
+ }
+
}
}