twitter-text icon indicating copy to clipboard operation
twitter-text copied to clipboard

JS: extractUrlsWithIndices does not extract URL when exclamation point is ending char in the path

Open tparsioan opened this issue 7 years ago • 1 comments

The extractUrlsWithIndices function does not properly recognize the full URL if the ending character in the path is an exclamation point (!). With a URL as such: https://www.domain.com/locale/#!?key1=value1&key2=value2

The twitter-text library will only recognize 'https://www.domain.com/locale/#' as being the URL instead of 'https://www.domain.com/locale/#!?key1=value1&key2=value2'.

tparsioan avatar Feb 22 '18 22:02 tparsioan

I found a workaround with a combination of encoding exclamation marks and adding an extra / so there is never a trailing exclamation mark

eli-front avatar Nov 08 '22 05:11 eli-front