From 32b1cfeded8474c41b76f857e28ad35fa003eeec Mon Sep 17 00:00:00 2001 From: martec Date: Sun, 14 May 2023 18:51:01 +0900 Subject: [PATCH] 0.4.8 --- re_version_file.json | 4 ++-- rin/editor/composer.json | 4 ++-- rin/editor/event/main_listener.php | 6 +++++- rin/editor/styles/all/template/js/automention.js | 5 +++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/re_version_file.json b/re_version_file.json index 9e3c70c..bd0f6e4 100644 --- a/re_version_file.json +++ b/re_version_file.json @@ -1,9 +1,9 @@ { "stable": { "0.4": { - "current": "0.4.7", + "current": "0.4.8", "announcement": "https://www.phpbb.com/community/viewtopic.php?f=456&t=2427126", - "download": "https://github.com/martec/Rin-Editor_for_phpBB/archive/0.4.7-beta.zip", + "download": "https://github.com/martec/Rin-Editor_for_phpBB/archive/0.4.8-beta.zip", "eol": null, "security": false } diff --git a/rin/editor/composer.json b/rin/editor/composer.json index 8b02d40..9214ae4 100644 --- a/rin/editor/composer.json +++ b/rin/editor/composer.json @@ -3,8 +3,8 @@ "type": "phpbb-extension", "description": "Rin Editor for phpBB", "homepage": "https://github.com/martec/Rin-Editor_for_phpBB", - "version": "0.4.7", - "time": "2023-05-03", + "version": "0.4.8", + "time": "2023-05-14", "license": "GPL-2.0-only", "authors": [ { diff --git a/rin/editor/event/main_listener.php b/rin/editor/event/main_listener.php index ac78966..579a308 100644 --- a/rin/editor/event/main_listener.php +++ b/rin/editor/event/main_listener.php @@ -84,7 +84,11 @@ public function rce_quick_reply($event) { if ($this->config['RCE_quickreply'] && $this->request->is_ajax() && $event['mode'] == 'quote') { - $data = array('quick_reply_msg' => $event['post_data']['post_text']); + $post_data = $event['post_data']; + $post_data['post_text'] = preg_replace('#\[mention\](.*?)\[\/mention\]#uis', '@\\1', $post_data['post_text']); + $post_data['post_text'] = preg_replace('#\[smention u=([0-9]+)\](.*?)\[\/smention\]#uis', '@\\2', $post_data['post_text']); + $post_data['post_text'] = preg_replace('#\[smention g=([0-9]+)\](.*?)\[\/smention\]#uis', '@\\2', $post_data['post_text']); + $data = array('quick_reply_msg' => $post_data['post_text']); $json = new \phpbb\json_response(); $json->send($data); } diff --git a/rin/editor/styles/all/template/js/automention.js b/rin/editor/styles/all/template/js/automention.js index 70c5dca..b4d0225 100644 --- a/rin/editor/styles/all/template/js/automention.js +++ b/rin/editor/styles/all/template/js/automention.js @@ -1,4 +1,5 @@ -function remoteSearch(a,b){a.length