Advanced Spoiler source code

By Cheon, YoungMin, on WordPress.org since 2009. 500+ active installs.

Browse code Download zip

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.

Compare 2.02 with 2.03

Release history

4 releases since April 2009
  1. 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. 2.02 Nov 23, 2009
  3. 2.01b Aug 22, 2009
  4. 2.01a Apr 26, 2009
Full Advanced Spoiler changelog with diffs

Source of 2.03

50 files
Browse all Advanced Spoiler 2.03 files Browse trunk