1. A method for tokenizing user-generated content, using a computer implemented security system, the method comprising: pre-processing a user-generated content input string utilizing a secondary input of target language, wherein the pre-preprocessing converts existing text into a token stream text node at the start of an HTML tag for insertion into a token stream; and extracting tokens, using a processor, from the pre-processed user-generated content string to generate the token stream, wherein the token stream is yielded to a caller rather than the user-generated content to prevent attacks on the user-generated content; wherein the extraction of tokens from the pre-processed user-generated content requires scanning the pre-processed user-generated content string by individual runes, and sending each rune to a specific buffer based upon signaling individual finite state machines.