Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use absolute URL for logo in email #2628

Merged
merged 1 commit into from
Nov 11, 2020
Merged

Conversation

EricFromCanada
Copy link
Contributor

Prepends the wiki site URL to the logo path used when sending email from the wiki.

Before: <img src="/uploads/logo.png"
After: <img src="http://wiki.site.url/uploads/logo.png

@@ -56,7 +56,7 @@ module.exports = {
subject: `${opts.subject} - ${WIKI.config.title}`,
text: opts.text,
html: _.get(this.templates, opts.template)({
logo: WIKI.config.logoUrl,
logo: WIKI.config.host + WIKI.config.logoUrl,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logoUrl can also be an absolute URL. There should be a check to see whether logoUrl starts with http and only prefix the host if not.

@EricFromCanada
Copy link
Contributor Author

Added a ternary that conditionally prepends the host URL. Tested both cases on my installation.

@NGPixel NGPixel merged commit d04e33e into requarks:dev Nov 11, 2020
jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this pull request Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants