Why is Apronus allowing the White king to castle through an attacked square? I was using Apronus to make a new chess puzzle for Puzzling Stack Exchange, but then it did something odd.
[FEN &quot;&quot;]

1. Nh3 f5 2. e4 fxe4 3. d3 exd3 4. Be2 Kf7 5. Qd2 dxe2 6. O-O

It's letting the White king castle through a square that is attacked by a Black pawn-that is an illegal move! One should know that our replayer is not built to detect checks and whatnot, so I am able to show it here just fine. However, just shouldn’t be happening in a properly built PGN editor, which Apronus is.
Does anyone have any idea why this is happening?
I happen to be the author of the chessboard editor under discussion. Let me clarify the issue.

This editor is supposed to enforce legal moves but it has a bug which prevents it from being able to make a pawn capture onto the final rank. Therefore it cannot notice that a black chessman controls the f1 square. If you place a black bishop on the a6-f1 diagonal then it won't allow White to castle.

There is a newer chessboard editor that is free from this bug: https://www.apronus.com/chess/puzzle/editor.php?editpuzzle=0, which is meant as a powerful puzzle editor but it can serve as a PGN editor, too.

The "position setup" interface can be used to illustrate an arbitrary sequence of chessboards, not necessarily legal or illegal moves. If you tick the checkbox "Animation sequence" you will see that it keeps a record of all board positions like frames in a movie. It allows you to delete certain frames which effectively allows you to set up an arbitrary sequence of board position and generate an animated GIF diagram. I am the author of this tool.