Closed dredaz closed 2 years ago
Hi, I can look at that, but I'm not sure it is possible to have it fixed. It's already quite complicated to prevent WordPress from inserting all sort of insidious tags and characters within the PGN, even while keeping the same editor. A workaround is to upload the game as a separated file: you can upload a .pgn file with the media upload tool, and then:
[pgn_compat url=<url-to-the-uploaded-file>]
As of its version 7.0.0, the advised way to use RPB Chessboard is to use the Gutenberg editor and the chess-game/chess-diagram blocks provided by the plugin. The old shortcode mechanism is maintained to handle existing content, but new chess content should be created with the Gutenberg editor and the chess-game/chess-diagram blocks.
One point in favor of preferring the chess-game/chess-diagram blocks is precisely that the PGN text is managed much more robustly in the blocks than in the shortcodes. In particular, it does not get polluted with <p></p>
or <br/>
tags switching between the Classic editor and the Gutenberg editor.
Hello Yoan,
This is not rpb-chessboard issue but wordpress.
In my site, I;m still using Classic Editor. Switching between visual and text editor would cause wordpress generate unnecessary p and br tags inside png shortcodes. Is there any way to solve this?
Warm regards,
I paste an example below.
[pgn_compat][Event "Oakham YM"]
[Site "Oakham"]
[Date "1988.??.??"]
[Round "?"]
[White "Grigory Serper"]
[Black "Catalin Navrotescu"]
[Result "0-1"]
[ECO "C05"]
[WhiteElo "2450"]
[BlackElo "2280"]
[PlyCount "92"]
[EventDate "1988.03.??"]
1. e4 e6 2. d4 d5 3. Nd2 Nf6 4. e5 Nfd7 5. f4 c5 6. Ngf3 Nc6 7. c3 cxd4 8. Nxd4
Nxd4 9. cxd4 Qb6 10. Nf3 Nb8 11. a3 Bd7 12. Bd3 Nc6 13. Bc2 Be7 14. O-O g6 15.
Rb1 h5 16. b4 Kf8 17. Be3 Kg7 18. Ng5 Bxg5 19. fxg5 Nxe5 20. Rf6 Be8 21. Bf2
Ng4 22. Qf3 Rc8 23. Bb3 Qd8 24. Bg3 Rf8 25. Rf4 Qxg5 26. h3 e5 27. dxe5 Nxe5
28. Qxd5 Qxg3 29. Qxe5+ Kh6 30. Bd5 Bc6 31. Bxc6 Rxc6 32. Rbf1 Rfc8 33. Qd5 f5
34. R4f3 Qd6 35. Rd3 Qxd5 36. Rxd5 Rc3 37. Rd7 Rxa3 38. Rf2 b6 39. b5 Rc5 40.
Rb2 Ra5 41. h4 Rc4 42. g3 Rg4 43. Rb3 f4 44. Kh2 fxg3+ 45. Kh3 g2 46. Re3 g1=R
$1 {White resign here!} 0-1
[/pgn_compat]