Fix encodeURIComponent problem

This commit is contained in:
idotj 2023-10-23 12:19:13 +02:00
parent 3e49d23798
commit 7dbbd0c6f4
4 changed files with 10 additions and 7 deletions

View File

@ -1,3 +1,6 @@
v3.10.4 - 23/10/2023
- Fix HTML encodeURIComponent problem
v3.10.3 - 18/10/2023 v3.10.3 - 18/10/2023
- Fix media load when post has more than one image - Fix media load when post has more than one image

View File

@ -1,4 +1,4 @@
/* Mastodon embed feed timeline v3.10.3 */ /* Mastodon embed feed timeline v3.10.4 */
/* More info at: */ /* More info at: */
/* https://gitlab.com/idotj/mastodon-embed-feed-timeline */ /* https://gitlab.com/idotj/mastodon-embed-feed-timeline */

View File

@ -1,5 +1,5 @@
/** /**
* Mastodon embed feed timeline v3.10.3 * Mastodon embed feed timeline v3.10.4
* More info at: * More info at:
* https://gitlab.com/idotj/mastodon-embed-feed-timeline * https://gitlab.com/idotj/mastodon-embed-feed-timeline
*/ */
@ -20,7 +20,7 @@ window.addEventListener("load", () => {
default_theme: "auto", default_theme: "auto",
// Your Mastodon instance // Your Mastodon instance
instance_url: "https://mastodon.social", instance_url: "https://mastodon.online",
// Choose type of toots to show in the timeline: 'local', 'profile', 'hashtag'. Default: local // Choose type of toots to show in the timeline: 'local', 'profile', 'hashtag'. Default: local
timeline_type: "local", timeline_type: "local",
@ -149,7 +149,7 @@ MastodonApi.prototype.buildTimeline = async function () {
this.mtBodyContainer.innerHTML = this.mtBodyContainer.innerHTML =
'<div class="mt-error"><span class="mt-error-icon">📭</span><br/><strong>Sorry, no toots to show</strong><br/><div class="mt-error-message">Got ' + '<div class="mt-error"><span class="mt-error-icon">📭</span><br/><strong>Sorry, no toots to show</strong><br/><div class="mt-error-message">Got ' +
this.FETCHED_DATA.timeline.length + this.FETCHED_DATA.timeline.length +
' toots from the server but due to the "hide filters" applied, no toot is shown</div></div>'; ' toots from the server. <br/>This may be due to an incorrect configuration in the parameters or to filters applied to hide certains type of toots.</div></div>';
} else { } else {
// Insert link after last toot to visit Mastodon page // Insert link after last toot to visit Mastodon page
if (this.LINK_SEE_MORE) { if (this.LINK_SEE_MORE) {
@ -157,7 +157,7 @@ MastodonApi.prototype.buildTimeline = async function () {
if (this.TIMELINE_TYPE === "profile") { if (this.TIMELINE_TYPE === "profile") {
linkSeeMorePath = this.PROFILE_NAME; linkSeeMorePath = this.PROFILE_NAME;
} else if (this.TIMELINE_TYPE === "hashtag") { } else if (this.TIMELINE_TYPE === "hashtag") {
linkSeeMorePath = "tags/" + encodeURIComponent(this.HASHTAG_NAME); linkSeeMorePath = "tags/" + this.HASHTAG_NAME;
} else if (this.TIMELINE_TYPE === "local") { } else if (this.TIMELINE_TYPE === "local") {
linkSeeMorePath = "public/local"; linkSeeMorePath = "public/local";
} }
@ -165,7 +165,7 @@ MastodonApi.prototype.buildTimeline = async function () {
'<div class="mt-footer"><a href="' + '<div class="mt-footer"><a href="' +
this.INSTANCE_URL + this.INSTANCE_URL +
"/" + "/" +
linkSeeMorePath + this.escapeHtml(linkSeeMorePath) +
'" target="_blank" rel="nofollow noopener noreferrer">' + '" target="_blank" rel="nofollow noopener noreferrer">' +
this.LINK_SEE_MORE + this.LINK_SEE_MORE +
"</a></div>"; "</a></div>";

File diff suppressed because one or more lines are too long