Now attributes are escaped only if escape is activated

Add a 4th parameter instead of using $charset

clean code.

Correct bug Call to undefined method Tag.getValue

fix tests