Why should ATS provide this functionality? What's the benefit of having our own implementation? Would the addition be worth paying the maintenance cost?
It would make some sense if the API were optimized for TSIOBuffer, TSVIO, or something ATS specific, but the function signatures tell that these functions could be simply replaced with functions provided by a third party library. Nothing needs internal information that can't be accessed by plugins. -- Masakazu On Mon, Jul 20, 2026 at 10:51 AM Brian Neradt <[email protected]> wrote: > [email protected]: > > Per issue: > https://github.com/apache/trafficserver/issues/13331 > > I'm proposing adding an API to perform HTML escaping: > > constexpr bool USE_ATTRIBUTE_MODE = true; > > TSReturnCode TSStringHtmlEscape(const char * str, int str_len, char * dst, > size_t dst_size, size_t * length, bool use_attribute_mode); > > TSReturnCode TSStringHtmlUnescape(const char * str, int str_len, char * > dst, size_t dst_size, size_t * length); > > This is pretty analogous to our current TSStringPercentEncode/ > TSStringPercentDecode API. See the draft PR implementing this here: > https://github.com/apache/trafficserver/pull/13408 > > Please let me know if you have any thoughts or concerns. > > Thanks, > Brian Neradt > -- > "Come to Me, all who are weary and heavy-laden, and I will > give you rest. Take My yoke upon you and learn from Me, for > I am gentle and humble in heart, and you will find rest for > your souls. For My yoke is easy and My burden is light." > > ~ Matthew 11:28-30 >
