Only append generator tag on HTML pages Closes #5113