[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
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

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

Post by Arty »

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

Found several bugs while working in this issue :)

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

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

Post by hanakin »

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
Donations welcome via Paypal Image

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

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

Post by Arty »

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

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

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

Post by JoshyPHP »

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 »

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