FIX: broken emoji url on password reset w/ subfolder (#19373)

* FIX: broken emoji url on password reset w/ subfolder

* Use Discourse.base_path to account for subfolder

I do like where you are going with using Emoji.url_for but due to the
lack of svg support currently I think we need to use the current svg
file we have. The emoji png files we have render too blurry at high
resolution.

This commit uses the `Discourse.base_path` so that a subfolder install
will have the correct image path.

I do think in the future we should do some work around using a helper
similar to Emoji.url_for with svg support so that we better standardize
our use of these emojis.

Co-authored-by: Blake Erickson <o.blakeerickson@gmail.com>
This commit is contained in:
Renato Atilio 2022-12-09 14:01:43 -03:00 committed by GitHub
parent 5d1444e3ca
commit 5c67b073ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<%if flash[:error]%>
<div class='invite-error'>
<div class="error-image">
<img src="/images/sweat-smile-face.svg" alt="sweat-smile-face emoji">
<img src="<%= Discourse.base_path + '/images/sweat-smile-face.svg' %>" alt="sweat-smile-face emoji">
</div>
<div class="error-info">
<%=flash[:error].html_safe%>

View File

@ -2,7 +2,7 @@
<%if @error%>
<div class='invite-error'>
<div class="error-image">
<img src="/images/sweat-smile-face.svg" alt="sweat-smile-face emoji">
<img src="<%= Discourse.base_path + '/images/sweat-smile-face.svg' %>" alt="sweat-smile-face emoji">
</div>
<div class="error-info">
<%= @error.html_safe %>