SUMMARY If <a> element does not have 'href' attribute, the JS script in WebHitTestResult generates an error: Uncaught TypeError: Cannot read property 'trim' of null. Such <a> tags are widely used by Twine/Tweego story formats. Thus debugging such stories using Falkon is greatly complicated. STEPS TO REPRODUCE 1. Create a HTML document with <a> element which does not have 'href' attribute (handles the link via a script, for example) 2. Open it in Falkon 3. Click the link. OBSERVED RESULT "TypeError: Cannot read property 'trim' of null." in the console log. EXPECTED RESULT No errors SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: git master KDE Frameworks Version: git master Qt Version: 5.12.1 ADDITIONAL INFORMATION http://www.motoslave.net/tweego/
Created attachment 118055 [details] proposed patch
Git commit b508ed2260a9fd9951a0b7536514be7ff2609ae3 by David Rosca. Committed on 14/02/2019 at 07:44. Pushed by drosca into branch 'master'. WebHitTestResult: Expect null href attribute Patch by Eugene Shalygin M +6 -3 src/lib/webengine/webhittestresult.cpp https://commits.kde.org/falkon/b508ed2260a9fd9951a0b7536514be7ff2609ae3