MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / neutralizeUntrustedDelimiter

Function neutralizeUntrustedDelimiter

app/src/AI/Conversation.cpp:34–40  ·  view source on GitHub ↗

* @brief Neutralizes any forged delimiter inside untrusted payload text. */

Source from the content-addressed store, hash-verified

32 * @brief Neutralizes any forged <untrusted> delimiter inside untrusted payload text.
33 */
34static QString neutralizeUntrustedDelimiter(const QString& payload)
35{
36 QString out = payload;
37 out.replace(QStringLiteral("</untrusted"), QStringLiteral("< /untrusted"), Qt::CaseInsensitive);
38 out.replace(QStringLiteral("<untrusted"), QStringLiteral("< untrusted"), Qt::CaseInsensitive);
39 return out;
40}
41
42//--------------------------------------------------------------------------------------------------
43// Construction / destruction

Callers 1

recordToolResultMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected