Advanced Spoiler source code
By Cheon, YoungMin, on WordPress.org since 2009. 500+ active installs.
New version of Ajax Spoiler plugin renamed to ‘Advanced Spoiler’. Show or hide contents(text, image etc.) with animated effects wrapped by spoiler markup tag([spoiler][/spoiler]). Below is its source code for every one of its 4 releases, what changed in the latest one, and how often it ships.
What changed in 2.03
Released Nov 20, 2026, 16 years after 2.02- Security: fixed stored XSS through the show/hide shortcode attributes (Simple mode inline onclick, and HTML injection when the toggle label changes in jQuery mode).
- Removed the inline onclick handler and inline script. Simple mode now loads js/simple-spoiler.js, which binds the toggle with addEventListener.
- Show/hide labels are passed in data-show/data-hide attributes and written as plain text, never as HTML.
- Escaped the feed link and the option page preview.
- PHP 7/8 compatibility: removed =& new and create_function(), and fixed undefined index notices on the option page.
- Removed the unused MooTools and Prototype scripts; jQuery is the only animated mode.
6 files changed since 2.02: 3 modified, 1 added, 2 removed.
- advanced-spoiler.php modified, -674 bytes
- js/jquery-spoiler.js modified, +42 bytes
- readme.txt modified, +1,005 bytes
- js/simple-spoiler.js added
- js/moo-spoiler.js removed
- js/prototype-spoiler.js removed
Release history
4 releases since April 2009- 2.03 Nov 20, 2026 Security: fixed stored XSS through the show/hide shortcode attributes (Simple mode inline onclick, and HTML injection when the toggle label changes in jQuery mode).
- 2.02 Nov 23, 2009
- 2.01b Aug 22, 2009
- 2.01a Apr 26, 2009