10ecdfa2e4
Adds the SQL Server Data Tools project for the fuchs_fds database — tables, table types, functions and stored procedures that the backend calls (e.g. fds__getInvoice, fds__merge_bankingtransactions, fds__tt__bankingtransactions, fds__admin_getReportCatalog, fis_* auth). Build/model caches (bin, obj, *.dbmdl, *.jfm, *.user) are git-ignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
12 lines
432 B
Transact-SQL
12 lines
432 B
Transact-SQL
|
|
CREATE FUNCTION [dbo].[strings_encodeHTML](@inputText NVARCHAR(MAX))
|
|
RETURNS NVARCHAR(MAX)
|
|
AS
|
|
BEGIN
|
|
DECLARE @encodedText NVARCHAR(MAX);
|
|
|
|
-- Use FOR XML PATH to escape special characters
|
|
SET @encodedText = CAST((SELECT @inputText AS [p] FOR XML PATH(''), TYPE) as nvarchar(max));
|
|
|
|
RETURN IIF(LEN(@encodedText) < 7, '', dbo.strings_replaceSpecialCharsInHTML(SUBSTRING(@encodedText, 4, LEN(@encodedText) -7)));
|
|
END; |