Currently, the Trim() formula strips links out of text content. As a workaround, you can find the first and last non-space indices in the string, and use the Middle() formula to remove whitespace at the beginning and end of the string.
The formula I have written defines a few variables with the new WithName() formula and then uses them to select the middle of the string: