From ab9f1274636c8a71849372cc31c5740fc331c8c4 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Thu, 14 Nov 2024 04:27:12 -0800 Subject: [PATCH] =?UTF-8?q?Mitigated=20super-linear=20backtracking=20in=20?= =?UTF-8?q?regex=20=E2=86=9E=20[auto-sync=20from=20`adamlui/ai-web-extensi?= =?UTF-8?q?ons/googlegpt`]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chatgpt/googlegpt/googlegpt.user.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chatgpt/googlegpt/googlegpt.user.js b/chatgpt/googlegpt/googlegpt.user.js index fb63a2413..48cca9a12 100644 --- a/chatgpt/googlegpt/googlegpt.user.js +++ b/chatgpt/googlegpt/googlegpt.user.js @@ -149,7 +149,7 @@ // @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!) // @author KudoAI // @namespace https://kudoai.com -// @version 2024.11.14.2 +// @version 2024.11.14.3 // @license MIT // @icon https://media.googlegpt.io/images/icons/googlegpt/black/icon48.png?8652a6e // @icon64 https://media.googlegpt.io/images/icons/googlegpt/black/icon64.png?8652a6e @@ -854,7 +854,7 @@ + `(v${latestVer}) ${app.msgs.alert_isAvail}! ` + '${app.msgs.link_viewChanges}`, function update() { // button GM_openInTab(app.urls.update.replace('meta.js', 'user.js') + '?t=' + Date.now(), @@ -3507,14 +3507,15 @@ else api.tryNew(caller) } + /* eslint-disable regexp/no-super-linear-backtracking */ function arrayify(strList) { // for get.related() calls log.caller = 'dataProcess.text ยป arrayify()' log.debug('Arrayifying related queries...') - return (strList.trim().match(/\d+\.?\s*(.+?)(?=\n|\\n|$)/g) || []) + return (strList.trim().match(/\d+\.?\s*([^\n]+?)(?=\n|\\n|$)/g) || []) .slice(0, 5) // limit to 1st 5 .map(match => match.replace(/\*\*/g, '') // strip markdown boldenings .replace(/^['"]*(?:\d+\.?\s*)?['"]*(.*?)['"]*$/g, '$1')) // strip numbering + quotes - } + } /* eslint-enable regexp/no-super-linear-backtracking */ })} }