? Success

User tests: Successful: Unsuccessful:

avatar Kubik-Rubik
Kubik-Rubik
26 Jul 2014

This is reference on #906 with a clean fix of the problem without any additional changes.

JoomlaCode: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30404

avatar Kubik-Rubik Kubik-Rubik - open - 26 Jul 2014
avatar piotr-cz
piotr-cz - comment - 27 Jul 2014

Thanks

avatar b2z
b2z - comment - 28 Jul 2014

@Kubik-Rubik can you plz provide more cleaner instructions how to test it? Thanks ;)

avatar roland-d
roland-d - comment - 9 Aug 2014

@piotr-cz & @Kubik-Rubik Please provide clear test instructions. Current instructions are not clear and I get a lot of errors applying what is suggested now. Thanks.

avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar nicksavov nicksavov - change - 21 Aug 2014
Title
Updated PR - CDATA for scripts and styles in XHTML documents #906
[#30404] Updated PR - CDATA for scripts and styles in XHTML documents #906
avatar brianteeman brianteeman - change - 21 Aug 2014
Status New Pending
avatar roland-d
roland-d - comment - 3 Sep 2014

Retrying my request for test instructions.

@piotr-cz & @Kubik-Rubik Please provide clear test instructions. Current instructions are not clear and I get a lot of errors applying what is suggested now. Thanks.


This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar piotr-cz
piotr-cz - comment - 6 Sep 2014

@roland-d
Description is in previous PR: #906
Test instruction is in JoomlaCode tracker item 30404

avatar b2z
b2z - comment - 17 Sep 2014

@piotr-cz I am still do not get it...

1) Set document to XHTML mode: JFactory::getDocument()->setMimeEncoding('application/xhtml+xml');

Where to set it? Just before <head> ?

2) Add inline scripts and styles and JText::script('TPL_BEEZ3_ALTOPEN');

Can you please clarify? These should be added using JDocument or simply inline? I should use CDATA? Can you provide some examples here of inline scripts and styles?

Thank you!

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar piotr-cz
piotr-cz - comment - 22 Sep 2014

@b2z
ad 1,2)
You may add these in top of template index.php file.

ad 2)
Just use anything that generates script declarations.

avatar b2z
b2z - comment - 24 Sep 2014

@test ok

How I tested it. I added this code into the top of Protostar index.php:

$document = JFactory::getDocument();

$document->setMimeEncoding('application/xhtml+xml');

// Add styles
$style = 'body {'
    . 'background: #00ff00;'
    . 'color: rgb(0,0,255);'
    . '}';
$document->addStyleDeclaration($style);

Then checked the source of the page - patch added for scripts: //<![CDATA and //]]> and for styles: /*<![CDATA*/ and /*//]>*/

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar b2z b2z - test_item - 24 Sep 2014 - Tested successfully
avatar Kubik-Rubik Kubik-Rubik - alter_testresult - 2 Oct 2014 - piotr-cz: Tested successfully
avatar roland-d roland-d - test_item - 2 Oct 2014 - Tested successfully
avatar roland-d
roland-d - comment - 2 Oct 2014

@test: After applying the patch, the scripts and styles are correctly wrapped in CDATA tags.

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3993.

avatar roland-d roland-d - change - 2 Oct 2014
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 2 Oct 2014

RTC thanks @roland-d @b2z @piotr-cz

avatar phproberto phproberto - change - 8 Oct 2014
Labels Added: ?
avatar phproberto phproberto - close - 8 Oct 2014
avatar phproberto phproberto - change - 8 Oct 2014
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2014-10-08 09:00:57

Add a Comment

Login with GitHub to post a comment