Welcome to Geeklog Saturday, May 27 2017 @ 05:49 am EDT


Status: offline

Stu1879

Forum User
Newbie
Registered: 04/05/2015
Posts: 5
Since upgrading from 2.1.1 to 2.1.2, I am having problems with script tags in my content. Here is a minimal repro case:

Create a story with the following body content:
PHP Formatted Code

<script>foo</script>
<script>bar</script>
 


Save the story and navigate to it. If the page source is viewed, the contents of the story body appear as:
PHP Formatted Code

<script>foo</script>
<script>foo</script>
 


Basically the contents of the first script tag are copied into all the subsequent tags.

The issue is appearing for me in a static page with 3 script tags driving a javascript gallery, and in this case the same mangling is also happening when I save the page via the (basic) editor. If I restore the correct content by editing the DB directly then it appears correctly in the editor until it is saved using the editor, at which point it gets mangled. The mangled version appears in the output HTML every time.

As far as I know, I have all HTML filtering turned off.

Any ideas what is happening?

Status: offline

Stu1879

Forum User
Newbie
Registered: 04/05/2015
Posts: 5
This looks like a bug. Setting 'Disable Autotags' to true fixes the problem. I guess something is going wrong in PLG_replaceTags(), but PHP is not really my thing...

Status: offline

Stu1879

Forum User
Newbie
Registered: 04/05/2015
Posts: 5

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/2005
Posts: 1200
Thanks for the report. I had notice this issue in Staticpages as well and had not had a chance to investigate it.
One of the Geeklog Core Developers.

All times are EDT. The time is now 05:49 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content