Ticket #1017 (closed defect: invalid)

Opened 6 years ago

Last modified 5 years ago

TransformInnerHTML adds extra lines for indented </script> tag

Reported by: znoob2@… Owned by: wymsy
Priority: normal Milestone:
Component: HTML Output Version:
Severity: normal Keywords: extra lines script tag
Cc:

Description

In the <head> section of my page, I have an indented script tag. Because of the indentation, TransformInnerHTML keeps inserting more and more lines before the script closing tag each time I switch to code view and back.

I solved it by modifying line 73 in TransformInnerHTML.js from

s=s.replace(/^\s*/,"").replace(/ +\n/g,"\n").replace(/[\r\n]+<\/script>/g,"\n</script>");

to

s=s.replace(/^\s*/,"").replace(/ +\n/g,"\n").replace(/[\r\n]+(\s*)<\/script>/g,"\n$1</script>");

Could a developer please update this script? I encountered similar behaviour with the closing of the head tag a few days ago when I didn't use the TransformInnerHTML yet. But I didn't look into it since I switched. Please have a look at it.

Sincerely, Paul

Change History

Changed 5 years ago by ray

  • component changed from Plugin_GetHtml to HTML Output
  • milestone set to 0.96

Changed 5 years ago by ray

  • status changed from new to closed
  • resolution set to invalid
  • milestone deleted

cannot reproduce this

Note: See TracTickets for help on using tickets.