Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plg_system_sef] Add sef URI when using srcset attribute #10464

Merged
merged 4 commits into from
May 20, 2016

Conversation

andrepereiradasilva
Copy link
Contributor

@andrepereiradasilva andrepereiradasilva commented May 14, 2016

Pull Request for Issue #10463.

Summary of Changes

See #10463

Testing Instructions

  • Use SEF URL (global config + sef system plugin)
  • Add an image in an article with this html (or equivalent)
<img src="images/sampledata/parks/banner_cradle.jpg" srcset="images/sampledata/parks/banner_cradle.jpg" alt="yyy" />
  • Check in the frontend the srcset attribute URL is NOT converted to SEF URL (misses the base path).
  • Apply patch
  • Check in the frontend the srcset attribute URL is converted to SEF URL (in this example, should be /images/sampledata/parks/banner_cradle.jpg or /<sitepath>/images/sampledata/parks/banner_cradle.jpg)

Please note this will not solve all srcset possibilities, only for cases like the one described in the issue (path to one image).

@@ -107,7 +107,7 @@ public function onAfterRender()

// Check for all unknown protocals (a protocol must contain at least one alpahnumeric character followed by a ":").
$protocols = '[a-zA-Z0-9\-]+:';
$attributes = array('href=', 'src=', 'poster=');
$attributes = array('href=', 'src=', 'srcset=', 'poster=');
foreach ($attributes as $attribute)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a clean line bevor the foreach?

@andrepereiradasilva
Copy link
Contributor Author

@zero-24 this PR is not for code style of the SEF plugin ...

@wojsmol
Copy link
Contributor

wojsmol commented May 14, 2016

@zero-24 Please see #10465

@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on 8474310

Issue confirmed and patch fixes it


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

@infograf768
Copy link
Member

I have tested this item ✅ successfully on 8474310


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

@infograf768
Copy link
Member

RTC. Thanks


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 18, 2016
@infograf768
Copy link
Member

for 3.6.0 I guess.

@brianteeman brianteeman added this to the Joomla 3.6.0 milestone May 18, 2016
@roland-d roland-d merged commit 8c17f56 into joomla:staging May 20, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 20, 2016
@roland-d
Copy link
Contributor

Thanks everybody

@andrepereiradasilva andrepereiradasilva deleted the patch-9 branch May 20, 2016 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants