Bug 50713: Strip two trailing newlines that action=parse adds

action=parse adds two trailing newlines to the HTML it emits. Those newlines
are not emitted by an extension tag. Strip those even if there is no paragraph
wrapping.

Change-Id: Iddb0e0e92a5410092b3f9a88680767d78c9c473e
Merge "Bug 50713: Strip two trailing newlines that action=parse adds"