diff options
author | George Hazan <george.hazan@gmail.com> | 2024-04-01 19:58:51 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-04-01 19:58:55 +0300 |
commit | 41d8d958250a1c84927428e8cf654b81cc66f16a (patch) | |
tree | 01b00aeb1d2908f0b449b8b3445f46e4058e6ad9 /plugins/NewStory/src/utils.cpp | |
parent | d4ab2e7d0147a5443b5fbf03dedc3324f0b1b2cf (diff) |
NewStory: support for advanced url & img bbcodes
Diffstat (limited to 'plugins/NewStory/src/utils.cpp')
-rw-r--r-- | plugins/NewStory/src/utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/NewStory/src/utils.cpp b/plugins/NewStory/src/utils.cpp index fdeb6db9f3..a02d6aa393 100644 --- a/plugins/NewStory/src/utils.cpp +++ b/plugins/NewStory/src/utils.cpp @@ -148,11 +148,11 @@ void UrlAutodetect(CMStringW &str) int level = 0;
for (auto *p = str.c_str(); *p; p++) {
- if (!wcsncmp(p, L"[img=", 5) || !wcsncmp(p, L"[url]", 5)) {
+ if (!wcsncmp(p, L"[img=", 5) || !wcsncmp(p, L"[img]", 5) || !wcsncmp(p, L"[url]", 5) || !wcsncmp(p, L"[url=", 5)) {
p += 4;
level++;
}
- if (!wcsncmp(p, L"[/img]", 6) || !wcsncmp(p, L"[/img]", 6)) {
+ if (!wcsncmp(p, L"[/img]", 6) || !wcsncmp(p, L"[/url]", 6)) {
p += 5;
level--;
}
|