fix: esc_url context that broke ajax url

This commit is contained in:
wolfgang101 2024-11-24 17:50:04 +01:00
parent d50ebd2d0a
commit 424909c665
2 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,7 @@
Plugin Name: Include Mastodon Feed
Plugin URI: https://wolfgang.lol/code/include-mastodon-feed-wordpress-plugin
Description: Plugin providing [include-mastodon-feed] shortcode
Version: 1.9.8
Version: 1.9.9
Author: wolfgang.lol
Author URI: https://wolfgang.lol
License: MIT
@ -722,7 +722,7 @@ function display_feed($atts) {
<script>
window.addEventListener("load", () => {
mastodonFeedLoad(
"<?php echo esc_url(sanitize_url( $apiUrl, ['https'] )); ?>",
"<?php echo esc_url( $apiUrl, ['https'], 'apicall' ); ?>",
"<?php echo filter_var( $elemId, FILTER_UNSAFE_RAW ); ?>",
{
linkTarget: "<?php echo esc_attr(filter_var( $atts['linktarget'], FILTER_UNSAFE_RAW )); ?>",

View File

@ -5,7 +5,7 @@ Tags: mastodon, status, feed
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.9.8
Stable tag: 1.9.9
License: MIT
License URI: https://directory.fsf.org/wiki/License:Expat
@ -154,6 +154,9 @@ Use the following URL to get your ID:
== Changelog ==
= 1.9.9 =
* fixed esc_url context that previously broke the URL for the Mastodon API JS ajax request (thank you @beach@illo.social)
= 1.9.8 =
* fix broken date-locale and date-options parameters (thank you @crusy@chaos.social)
* improved string excaping for text parameters and added url escaping