asah / footprint2009dev

original dev repo for AllForGood.org
http://AllForGood.org/
0 stars 1 forks source link

consistent use of relative vs. absolute url paths + tooling to avoid accidental use #297

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I vote for absolute paths (no ../) -- much simpler to get things right.

sargent~/pkg/fploadtest/frontend>find . -type f | xargs grep 
"[.][.]/images/" | grep -v svn
./css/main.css:  background-image: url('../images/glow-top.gif');
./css/main.css:  background-image: url('../images/glow-left.gif');
./css/main.css:  background-image: url('../images/glow-right.gif');
./css/main.css:  background-image: url('../images/glow-bottom.gif');
./css/main.css:  background: url(../images/modal/header.gif) repeat-x;
./css/main.css:  background: url(../images/modal/button.gif) repeat-x;
./templates/base.html:    <td class='glow_tl'><img class='glow_tl' 
src='../images/glow-tl.gif'></td>
./templates/base.html:    <td class='glow_tr'><img class='glow_tr' 
src='../images/glow-tr.gif'></td>
./templates/base.html:    <td class='glow_bl'><img class='glow_bl' 
src='../images/glow-bl.gif'></td>
./templates/base.html:    <td class='glow_br'><img class='glow_br' 
src='../images/glow-br.gif'></td>

these can all be replaced by /images/...

also modify code review tool to auto detect ".."s

Original issue reported on code.google.com by adam.sah on 19 May 2009 at 4:55

GoogleCodeExporter commented 9 years ago

Original comment by adam.sah on 5 Jun 2009 at 2:45

GoogleCodeExporter commented 9 years ago
ah, I fixed this a while ago as part of adding suprfetch.

grep "[.][.]/" frontend/*/*
(no results)

Original comment by adam.sah on 14 Jun 2009 at 5:21