1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2025-12-10 22:12:45 +00:00

fixed task url detection

This commit is contained in:
Patrizio Bekerle 2017-06-15 11:17:52 +02:00
parent cb0da43ff5
commit f83dc7d00e
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
import QtQml 2.0
import com.qownnotes.noteapi 1.0
import QOwnNotesTypes 1.0
/**
* This script creates a menu item and a button that parses the text that was copied
@ -63,7 +63,7 @@ QtObject {
description = description.replace(/<br.*?>/gim, "\n").replace(/<.+?>/gim, "");
// var urlRegExp = /<form name="COMMENTS_.+?".*? action="(.+?)" method/im;
var urlRegExp = /<a href="(.+?)[\?#].*?" class="main-buttons-item-link"/im;
var urlRegExp = /<a href="(.+?\d+\/tasks\/task\/view\/d+\/)[\?#].*?" class="main-buttons-item-link"/im;
var urlMatch = urlRegExp.exec(html);
var url = urlMatch !== null ? urlMatch[1] : "";