Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Relative URL not handled properly in inlined css #368

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments
Closed

Relative URL not handled properly in inlined css #368

GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

The following page gets broken by mod_pagespeed:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><script 
src="codelibrary/js/jquery-1.3.2.min.js.pagespeed.jm.eWR5IUrZrf.js" 
type="text/javascript"></script><script type="text/javascript" 
src="codelibrary/js/common.js.pagespeed.jm.RpC-NqsaO6.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>2012 Grant Forum</title>
<link rel="shortcut icon" href="templates/tpl_1326153135dept_of_ed/favicon.ico" 
type="image/x-icon"/>
<link href="templates/tpl_1326153135dept_of_ed/style.css" rel="stylesheet" 
type="text/css"/>
<script type='text/javascript'>var 
_gaq=_gaq||[];_gaq.push(['_setAccount','UA-8924770-3']);_gaq.push(['_trackPagevi
ew']);(function(){var 
ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.s
rc=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-an
alytics.com/ga.js';var 
s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s);})(
);</script><script type='text/javascript'>var 
__wtw_lucky_ref_id=12066;(function(){var 
wa=document.createElement('script');wa.type='text/javascript';wa.async=true;wa.s
rc=('https:'==document.location.protocol?'https://ssl':'http://ca58612')+'.lucky
orange.com/w.js';var 
s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(wa,s);})(
);</script></head>
<body class="wowza">
<div class="top">
<img src="templates/tpl_1326153135dept_of_ed/top_banner.jpg" width="640" 
height="129"/></div>
<div class="wrapper-wow">

<!--top end-->
<div class="video">
  <script type="text/javascript" src="flowplayer/flowplayer-3.2.6.min.js"></script>
        <!-- this A tag is where your Flowplayer will be placed. it can be anywhere -->
<a href="#" style="display:block;width:640px;height:360px" id="player">
    </a>
        <!-- this will install flowplayer inside previous A- tag. -->

        <script type="text/javascript">flowplayer("player","flowplayer/flowplayer.commercial-3.2.7.swf",{key:"#$25b5ebdf316d8decbca",clip:{url:'teststream',live:true,provider:'rtmp'},plugins:{rtmp:{url:'flowplayer/flowplayer.rtmp-3.2.3.swf',netConnectionUrl:'rtmp://184.73.172.212/live'}}});</script>
</div><!--video End-->

    <div class="clr"></div>
<div class="box-chat">
          <iframe src="http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=60f3f6443a/height=385/width=640" scrolling="no" height="385px" width="640px" frameBorder="0"><a href="http://www.coveritlive.com/mobile.php/option=com_mobile/task=viewaltcast/altcast_code=60f3f6443a" >2012 Grant Forum</a></iframe>
        </div>
        <div class="clr"></div>
<div class="logo"></div>
</div>
</div><!--wrappper end-->

</body>
</html>
<script></script>
_____________________________________________________________

The problem is that we are inlining a css-link:  
templates/tpl_1326153135dept_of_ed/style.css

Which has a relative URL background:#2a3e8d url(bg.jpg) no-repeat top center;

But in the inline style block the CSS is minified, but the link is not 
absolutified:

<style>body.wowza{background:#2a3e8d url(xbg.jpg.pagespeed.ic.piBJzwoEUQ.jpg) 
no ....

So the interaction between rewrite_css and inline_css is broken.

______________________________________________

Current work-around: Try adding:
ModPagespeedDisableFilters inline_css

to the pagespeed.conf file.

Original issue reported on code.google.com by nfor...@google.com on 10 Jan 2012 at 3:35

@GoogleCodeExporter
Copy link
Author

This actually looks fixed in trunk, but I can confirm broken in release.

Original comment by morlov...@google.com on 10 Jan 2012 at 4:09

@GoogleCodeExporter
Copy link
Author

Following up: Maksim indeed confirmed that it was broken in the release, and 
fixed on trunk. 

The problem can be resolved by building a release from trunk.  We will work on 
cutting a new release to fix this bug, but this typically takes us about a week.

Original comment by jmara...@google.com on 12 Jan 2012 at 12:46

@GoogleCodeExporter
Copy link
Author

Fixed in 0.10.20.1

Original comment by matterb...@google.com on 24 Jan 2012 at 7:25

  • Changed state: Fixed
  • Added labels: release-note

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant