Skip to content

Commit

Permalink
Fix decode_json error when setting non-ASCII characters in plugin con…
Browse files Browse the repository at this point in the history
…figuration (#1152)

* Fix searched as grabed text

* enable non-ASCII support in plugin configuration

* Update Plugins.pm

* Update Plugins.pm

---------

Co-authored-by: Difegue <[email protected]>
  • Loading branch information
natanane and Difegue authored Jan 20, 2025
1 parent b77b92c commit c7cba7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/LANraragi/Utils/Plugins.pm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ sub get_plugin_parameters {

# Replace with saved values if they exist
if ( $redis->hexists( $namerds, "enabled" ) ) {
my $saved_config = redis_decode( $redis->hget( $namerds, "customargs" ) );
# We don't decode this value in case there's UTF8 characters in plugin config.
my $saved_config = $redis->hget( $namerds, "customargs" );

#Decode it to an array for proper use
if ($saved_config) {
Expand Down

0 comments on commit c7cba7b

Please sign in to comment.