Skip to content

Commit

Permalink
fix: 修复bark推送url encode相关问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokinx authored Nov 13, 2023
1 parent 6fe63e4 commit 3bab77e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ function bark_push_msg( $comment_id ) {
'avatar' => get_avatar_url( $comment->comment_author_email ),
'url' => htmlspecialchars( get_comment_link( $comment_id ) ),
];
$title = trim( get_the_title( $comment->comment_post_ID ) ) ?: $query['group'];
$message = trim( $comment->comment_author . '' . $comment->comment_content );
$title = urlencode(trim( get_the_title( $comment->comment_post_ID ) ) ?: $query['group']);
$message = urlencode(trim( $comment->comment_author . '' . $comment->comment_content ));
if ( strpos( $query['avatar'], 'http' ) !== 0 ) {
$query['avatar'] = 'https:' . $query['avatar'];
}
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Description: Simple, smooth, data-driven, responsive WordPress theme
Author: Tokin
Author URI: https://biji.io
Version: 0.7.38
Version: 0.7.39
Tested up to: 5.9.3
Requires at least: 5.8
Requires PHP: 7.0
Expand Down

0 comments on commit 3bab77e

Please sign in to comment.