Truncates the HTML string to the specified length (and snippet for MODX evolugin/revolution)