Skip to content

Commit

Permalink
Bugfix update
Browse files Browse the repository at this point in the history
  • Loading branch information
WebOrganics committed Apr 18, 2011
1 parent a8d1cee commit 8f8bccf
Show file tree
Hide file tree
Showing 18 changed files with 646 additions and 400 deletions.
10 changes: 6 additions & 4 deletions app/Transformr.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,13 @@ function get_file_contents($url)
}
$content = curl_exec($cache);

// insert fullstop so tidy does not clean empty span or span with just a space
/* insert non breaking space so tidy does not clean empty span or span with just a space,
XSL however is set to strip-space elements="*" so it should not appear in results */

$content = trim(preg_replace('/<\s*span(.*?)>\s<\/\s*?span[^>\w]*?>/',
'<span$1>.$2</span>', $content));
'<span$1>&nbsp;$2</span>', $content));
$content = trim(preg_replace('/<\s*span(.*?)><\/\s*?span[^>\w]*?>/',
'<span$1>.</span>', $content));
'<span$1>&nbsp;</span>', $content));

$status = curl_getinfo($cache, CURLINFO_HTTP_CODE);
curl_close($cache);
Expand Down Expand Up @@ -386,7 +388,7 @@ private function tidy_html($html, $url='', $tidy_option='', $output ='')
$newdoc->formatOutput = true;
$newdoc->normalizeDocument();
$html = $newdoc->saveXML();
return str_replace(array("\r\n", "\r", "\n", "\t", "&#xD;"), '', $result);
return str_replace(array("\r\n", "\r", "\n", "\t", "&#xD;"), '', $html);
}
elseif ($tidy_option == 'online')
{
Expand Down
8 changes: 7 additions & 1 deletion app/arc/plugins/ARC2_StoreTemplatePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ function getHTMLDocHead() {
}

function getHTMLHeader() {
$header = '<div class="butt">
$header = '
<div id="fork-me">
<a href="http://wiki.github.com/WebOrganics/TransFormr">
<img src="/images/github.png" alt="Fork me on github" />
</a>
</div>
<div class="butt">
<small><a rel="nofollow" href="http://wiki.github.com/WebOrganics/TransFormr">Wiki</a> |
<a rel="nofollow" href="http://github.com/WebOrganics/TransFormr">Source</a> |
<a rel="nofollow" href="http://github.com/WebOrganics/TransFormr/issues">Issues</a> |
Expand Down

0 comments on commit 8f8bccf

Please sign in to comment.