Hi,
I'm trying to use the max_len validator in my posts. In the beginning I found it extremely useful, but then, during the tests, I found out that every time I try to change the font-size and the span tag is being added, it adds extra 37 characters to the final characters amount (which is actually quite logical, but...). Is there a chance to modify something so it will not count the characters added in tags? Entire content is a normal text only, so there is no chance any triangular brackets will be added in the content, if it helps. I will be grateful for any advice/solution.
Cheers,
S.
Edit: Figured it out, so sorry for spam. If anyone will ever be in a similar situation, you might find the function for your validator (validate_max_len in this case) and combine trim function with strip_tags.
I'm trying to use the max_len validator in my posts. In the beginning I found it extremely useful, but then, during the tests, I found out that every time I try to change the font-size and the span tag is being added, it adds extra 37 characters to the final characters amount (which is actually quite logical, but...). Is there a chance to modify something so it will not count the characters added in tags? Entire content is a normal text only, so there is no chance any triangular brackets will be added in the content, if it helps. I will be grateful for any advice/solution.
Cheers,
S.
Edit: Figured it out, so sorry for spam. If anyone will ever be in a similar situation, you might find the function for your validator (validate_max_len in this case) and combine trim function with strip_tags.