[RFC] Get rid of JavaScript in HTML code

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] Get rid of JavaScript in HTML code

Post by Arty » Sat Aug 17, 2013 4:29 pm

Ticket: http://tracker.phpbb.com/browse/PHPBB3-11795
PR: https://github.com/phpbb/phpbb3/pull/1666

Found several bugs while working in this issue :)
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
hanakin
Infrastructure Team
Infrastructure Team
Posts: 788
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] Get rid of JavaScript in HTML code

Post by hanakin » Sat Aug 17, 2013 4:58 pm

if we are finally going to do this can we possibly consolidate all the js files into a sub folder to clean things up a little templates/js/... or in the root of the prosilver folder even better, might be its own rfc after all is said and done, but worth mentioning here

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] Get rid of JavaScript in HTML code

Post by Arty » Sat Aug 17, 2013 5:05 pm

Definitely. There are too many small js files that could be consolidated in one big file and triggered via data attributes on document load.
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
JoshyPHP
Registered User
Posts: 348
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC] Get rid of JavaScript in HTML code

Post by JoshyPHP » Sun Aug 18, 2013 9:59 pm

I should correct myself. When I said "Twig can escape new lines in attributes" what I really meant was "Twig can escape attributes". Does Twig escape new lines? I've checked with the W3 Validator and it seems that new lines are valid in attribute values. As long as quotes get escaped, you're in the clear.

User avatar
NORDLANDVOLK
Registered User
Posts: 44
Joined: Thu Oct 14, 2010 8:14 pm
Location: Tracia

Re: [RFC] Get rid of JavaScript in HTML code

Post by NORDLANDVOLK » Thu Sep 19, 2013 3:20 pm

data-attributes is valid in HTML5 as a new furure.
So with other words Twig dont see the new data-attributes?
I think is a good idea to have js file in one big file just like a library.
Arty wrote:Definitely. There are too many small js files that could be consolidated in one big file and triggered via data attributes on document load.
+1.
sorry for my bad english :oops:

Post Reply