diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-01-18 19:22:03 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-01-18 19:22:03 +0200 |
commit | e8412f167ec2c8d72055181c2c5e1df09699a94e (patch) | |
tree | 17d8abb099580ac109f1ab16dab1f5c4c02998e8 /src/gmutil.c | |
parent | e39a4035a622e1e9e1573cc567cb43652fdef231 (diff) |
Fixed opening heading feed entries in a tab
The heading goto fragment wasn't being stripped appropriately from the URLs.
Diffstat (limited to 'src/gmutil.c')
-rw-r--r-- | src/gmutil.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gmutil.c b/src/gmutil.c index 69fa6d9f..0f1bc803 100644 --- a/src/gmutil.c +++ b/src/gmutil.c | |||
@@ -91,6 +91,15 @@ void stripDefaultUrlPort_String(iString *d) { | |||
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | const iString *urlFragmentStripped_String(const iString *d) { | ||
95 | const size_t fragPos = indexOf_String(d, '#'); | ||
96 | if (fragPos != iInvalidPos) { | ||
97 | return collect_String(newRange_String((iRangecc){ constBegin_String(d), | ||
98 | constBegin_String(d) + fragPos })); | ||
99 | } | ||
100 | return d; | ||
101 | } | ||
102 | |||
94 | void cleanUrlPath_String(iString *d) { | 103 | void cleanUrlPath_String(iString *d) { |
95 | iString clean; | 104 | iString clean; |
96 | init_String(&clean); | 105 | init_String(&clean); |