Add trim to rewrite of link in AI Deepchat
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3498489. -->
Reported by: [marcus_johansson](https://www.drupal.org/user/385947)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When talking to the AI Agent the following happened in Deepchat:</p>
<p>On one occation the AI returned the following link<br>
<code>View the field configuration](/ /admin/config/ai/logging/types/generic/edit/fields/ai_log.generic.field_deliver_address?entity_type=ai_log).</code></p>
<p>Meaning that it had a space in the start and the rewriter, thought it should rewrite it, because it was neither a slash or a protocol.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Trim the link, before checking and when applying.</p>
issue