c# - HTML Encoding alpha, beta, gamma -
i trying html encode string contains alpha, beta, , gamma characters (α, β, γ ). unfortunately, using system.web.httputility.htmlencode not encoding these characters. there other function in .net library encode these html?
not aware of built in tool this, can use handy function:
public string forcehtmlencode(string input) { return string.concat(input.select(c => "&#" + (int)c + ";")); } this convert characters in string html entities.
Comments
Post a Comment