twitter-text
twitter-text copied to clipboard
JS: extractUrlsWithIndices does not extract URL when exclamation point is ending char in the path
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'.
I found a workaround with a combination of encoding exclamation marks and adding an extra /
so there is never a trailing exclamation mark