Bugfix
Test
- Type x -> $x. into TL script field. At this point the context help should pop up. Instead, an insane error message is logged:
Client-side message: Problems during AJAX event execution. (exception: 'Script execution of 'services.tlscriptsearch.triggerCallback('[{"name": "add", "value": "add", "score":165, "snippet": "add($1)$2", "docHTML":"<div class=\"tlScriptDoc\\"><h2>Insert into attribute value</h2><pre><code>obj.add(ref, value)\n</code></pre> \n<p>H\u00e4 attaches the given value to the given multi-reference of the given object. \u00c4equivalent to <code class=\\"hljs inlineCode\\\">obj.add(ref, obj.get(ref).size(), value)</code>.</p> \\n<pre><code>obj.add(ref, index, value)\\n</code></pre> \n<p>Relatively <code class=\\\"hljs inlineCode\\\">obj.add(ref, index, value)</code> h\\\u00e4attaches the given value to the given multi-reference of the given object. The new value, if the reference is ordered, is added to the given index.</p> \n<p>\u00c4equivalent to<code class=\ "hljs inlineCode\\"> obj.set(ref, ... corresponding field of the given calendar (see <span class=\\\"tlObjectWrapper\\\"><span alt=\\\"\\\\" title=\\\"\\\\"><em class=\\\"fa-book fas\\\"></em></span> <a class=\\\"tlObject\\\" data-custom=\\\"false\\\" href=\\\"https://dev.top-logic.com/documentation/servlet/LayoutServlet/wa2ad1c5e1bac07c9-a97dc6447fbd9fa9?page=toSystemCalendar&uuid=155f70e5-1a3a-4b63-b53b-30a6261e4113\\\">toSystemCalendar</a></span> und <span class=\\\"tlObjectWrapper\\\"><span alt=\\\"\\\" title=\\\"\\\\"><em class=\\\"fa-book fas\\\"></em></span> <a class=\\\"tlObject\\\" data-custom=\\\"false\\\" href=\\\"https://dev.top-logic.com/documentation/servlet/LayoutServlet/wa2ad1c5e1bac07c9-a97dc6447fbd9fa9?page=toUserCalendar&uuid=17b7892f-ab6d-419a-80b5-107cb3a415ce\\">toUserCalendar</a></span><span></span>).</p></div>"}]')' failed: SyntaxError: missing ) after argument list', component: 'rootLayout#masterFrame', source: 'http://localhost:8080/tl-dev/servlet/LayoutServlet/w70bc1822af9db6db-482929fdcf008b0b#', layout: 'masterFrame.layout.xml', session: node0txdywt5har1zwge0xdic8ntr0, UserAgent[Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0])
If the (function) documentation contains an apostrophe, then this leads, due to insufficient escaping, to parse errors and thus to broken autocompletion (e.g. documentation of the TLScript function resolveAlias).
Test
In a TLScript field, a set of allowed functions for completion should be suggested immediately after entering a period.