DrQuincy Posted November 19, 2020 Posted November 19, 2020 The title says it all really. When using $sanitizer line() and text() seem the same and lines() and textarea() respectively. I.e. strip_tags() and then if line() or text() remove line returns also. What are the differences? Thanks.
kongondo Posted November 19, 2020 Posted November 19, 2020 23 minutes ago, DrQuincy said: What are the differences? I am not sure it can be any clearer than what is already stated in the respective documentation. $sanitizer line() (emphasis is mine). Quote Sanitize any string of text to single line, no HTML, and no specific max-length (unless given) This is the same as the text() sanitizer but does not impose a maximum character length (or byte length) unless given one in the $maxLength argument. This is useful in cases where the text sanitizer’s built in 255 character max length (1020 max bytes) is not enough, or when you want to specify a max length as part of the method arguments. Please note that like with the text sanitizer, the max length refers to a maximum number of characters, not bytes. The maxBytes is automatically set to the maxLength * 4, or can be specifically set via the maxBytes option. $sanitizer->lines(). Quote This is the same as the textarea() sanitizer but does not impose a maximum character length (or byte length) unless given one in the $maxLength argument. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now