From e4c0ee53ed748d53058b24d0b7203f2ce5926544 Mon Sep 17 00:00:00 2001 From: bohung Date: Mon, 23 May 2022 14:48:39 +0800 Subject: [PATCH] Fix show page bug. --- app/views/announcements/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/announcements/show.html.erb b/app/views/announcements/show.html.erb index 3132485..d10b751 100644 --- a/app/views/announcements/show.html.erb +++ b/app/views/announcements/show.html.erb @@ -152,7 +152,7 @@ $(function(){ $('.annc-comment-div .btn-comment').click(function(){ $.ajax({ - url: "<%= "/xhr/announcements/#{params[:slug]}-#{params[:uid]}/comment" %>", + url: "<%= "/xhr/announcements/#{URI.encode(params[:slug])}-#{params[:uid]}/comment" %>", data : {"comment" : $(this).parents('.annc-comment-div').find('.announcement-comment').html()}, dataType : "json", type : "get",