In the homework extensions, under 'Add publish button', the text of the tutorial refers to using form tags in place of anchors, and explains why this is necessary. However, the above code block instead demonstrates the same idea using anchors (which don't work, for exactly the reasons given in the tutorial). The same applies to the 'Delete post' section.
It looks like these were correct up until the most recent merge.