Answers.Body: <blockquote>
    <p>Do you have any idea why this is happening?</p>
  </blockquote>
  
  <p>Because it is a chessboard editor, not an engine.</p>
  
  <p>Here is what the <a href="https://www.apronus.com/chess/pgnviewer/" rel="nofollow noreferrer">Apronus</a> site says:</p>
  
  <blockquote>
    <p><strong>PGN Viewer and Editor <em>with Chess Puzzle Editor</em></strong></p>
    
    <ul>
    <li>online interactive chessboard with PGN viewer and editor, diagram    editor and puzzle editor</li>
    <li>set up any position to play against computer or analyze with a chess    engine</li>
    <li>make diagrams with arrows and selected squares or animations    indicating moves with arrows</li>
    <li>create links to your chess positions or embed chessboards on your own    pages</li>
    <li>design chess puzzles:</li>
    </ul>
  </blockquote>
  
  <p>Its main function is to help you design diagrams and puzzles not validate your games.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-04T12:41:26.737Z
Answers.LastActivityDate: 2019-04-04T12:41:26.737Z
Answers.UserDisplayName: Brian Towers
Answers.Body: <p>Well, for a definitive answer you need to ask the authors/maintainers of the website.  Especially since it has a &quot;legal moves only&quot; option above the board which is selected by default. Note that this very website's replayer also executes the illegal move in your post.</p>
  <p>I can imagine that one wants to analyze/record a complete game <em>even if an illegal move was made in it</em>, or show an almost-legal constructed game to reach a certain position. However, the <a href="http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm#c8.2" rel="nofollow noreferrer">PGN standards</a> forbid this:</p>
  <blockquote>
  <h3>8.2: Movetext section</h3>
  <p>The movetext section is composed of chess moves, move number indications, optional annotations, and a single concluding game termination marker.</p>
  <p>Because illegal moves are not real chess moves, they are not permitted in PGN movetext. They may appear in commentary, however. One would hope that illegal moves are relatively rare in games worthy of recording.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-04T12:38:16.587Z
Answers.LastActivityDate: 2019-04-04T12:38:16.587Z
Answers.LastEditDate: 2020-06-17T09:59:59.497Z
Answers.UserDisplayName: Glorfindel
Answers.Body: <p>I happen to be the author of the chessboard editor under discussion. Let me clarify the issue.</p>
  
  <p>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.</p>
  
  <p>There is a newer chessboard editor that is free from this bug: <a href="https://www.apronus.com/chess/puzzle/editor.php?editpuzzle=0" rel="noreferrer">https://www.apronus.com/chess/puzzle/editor.php?editpuzzle=0</a>, which is meant as a powerful puzzle editor but it can serve as a PGN editor, too.</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-05T11:31:34.880Z
Answers.LastActivityDate: 2019-04-05T11:39:13.557Z
Answers.LastEditDate: 2019-04-05T11:39:13.557Z
Answers.UserDisplayName: MichalRyszardWojcik
Body: <p>I was using <a href="https://www.apronus.com/chess/pgnviewer/" rel="nofollow noreferrer">Apronus</a> to make a new chess puzzle for <a href="https://puzzling.stackexchange.com/">Puzzling Stack Exchange</a>, but then it did something odd.</p>
  <pre><code>[FEN &quot;&quot;]
  
  1. Nh3 f5 2. e4 fxe4 3. d3 exd3 4. Be2 Kf7 5. Qd2 dxe2 6. O-O
  </code></pre>
  <p>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.</p>
  <p>Does anyone have any idea why this is happening?</p>
  
Tags: <software><pgn><castling><websites>
Title: Why is Apronus allowing the White king to castle through an attacked square?
ThreadText: # Why is Apronus allowing the White king to castle through an attacked square?
  
  (Asked by: username_0 on 2019-04-04)
  
  I was using Apronus to make a new chess puzzle for Puzzling Stack Exchange, but then it did something odd.
  [FEN ""]
  
  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?
  
  **Tags:** software, pgn, castling, websites
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2019-04-05. Score: 13 | Accepted answer
  
  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.
  
  
  ---
  
  ### Answer by username_1 on 2019-04-04. Score: 4
  
  > Do you have any idea why this is happening?
  
  Because it is a chessboard editor, not an engine.
  
  Here is what the [Apronus](https://www.apronus.com/chess/pgnviewer/) site says:
  
  > **PGN Viewer and Editor *with Chess Puzzle Editor***
  >
  > * online interactive chessboard with PGN viewer and editor, diagram editor and puzzle editor
  > * set up any position to play against computer or analyze with a chess engine
  > * make diagrams with arrows and selected squares or animations indicating moves with arrows
  > * create links to your chess positions or embed chessboards on your own pages
  > * design chess puzzles:
  
  Its main function is to help you design diagrams and puzzles not validate your games.
  
  
  ---
  
  ### Answer by username_2 on 2019-04-04. Score: 3
  
  Well, for a definitive answer you need to ask the authors/maintainers of the website. Especially since it has a "legal moves only" option above the board which is selected by default. Note that this very website's replayer also executes the illegal move in your post.
  
  I can imagine that one wants to analyze/record a complete game *even if an illegal move was made in it*, or show an almost-legal constructed game to reach a certain position. However, the [PGN standards](http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm#c8.2) forbid this:
  
  > ### 8.2: Movetext section
  >
  > The movetext section is composed of chess moves, move number indications, optional annotations, and a single concluding game termination marker.
  >
  > Because illegal moves are not real chess moves, they are not permitted in PGN movetext. They may appear in commentary, however. One would hope that illegal moves are relatively rare in games worthy of recording.
  
  
  ---
  
  