Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: horde/horde
...
head fork: horde/horde
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
13 framework/Mime/lib/Horde/Mime/Headers.php
@@ -587,18 +587,15 @@ public function getOb($field)
protected function _sanityCheck($data)
{
$charset_test = array(
- 'UTF-8',
'windows-1252',
self::$defaultCharset
);
- /* 8-bit check: if quoted-printable encoding detected, there were
- * non-ASCII characters. Additionally, for some reason converting the
- * DECODED value will correctly fix things when directly converting
- * the original value won't. */
- $data_encode = quoted_printable_encode($data);
- if (strlen($data_encode) != strlen($data)) {
- $data = quoted_printable_decode($data);
+ if (!Horde_String::validUtf8($data)) {
+ /* Appears to be a PHP error with the internal String structure
+ * which prevents accurate manipulation of the string. Copying
+ * the data to a new variable fixes things. */
+ $data = substr($data, 0);
/* Assumption: broken charset in headers is generally either
* UTF-8 or ISO-8859-1/Windows-1252. Test these charsets
View
3  framework/Mime/test/Horde/Mime/HeadersTest.php
@@ -139,10 +139,9 @@ public function testAddHeaderWithGroup()
public function testUnencodedMimeHeader()
{
- // The header is base64 encoded to preserve charaset data.
+ // The header is base64 encoded to preserve charset data.
$hdr = 'RnJvbTogqSBWSUFHUkEgriBPZmZpY2lhbCBTaXRlIDxzbHVzYXJza2lAZ29sZGVud2FyZS5jb20+DQo=';
$hdrs = Horde_Mime_Headers::parseHeaders(base64_decode($hdr));
-
$this->assertEquals(
'© VIAGRA ® Official Site <slusarski@goldenware.com>',
$hdrs->getValue('from')
View
26 imp/js/mobile.js
@@ -75,6 +75,19 @@ var ImpMobile = {
},
/**
+ * Checks if the current page matches the ID.
+ *
+ * @param string The ID to check.
+ *
+ * @return boolean True if page is equal to ID.
+ */
+ currentPage: function(page)
+ {
+ return ($.mobile.activePage &&
+ $.mobile.activePage.attr('id') == page);
+ },
+
+ /**
* Event handler for the pagebeforechange event that implements loading of
* deep-linked pages.
*
@@ -141,8 +154,7 @@ var ImpMobile = {
title = $('#imp-mailbox-' + mailbox).text(),
params = {}, ob;
- if ($.mobile.activePage &&
- $.mobile.activePage.attr('id') == 'mailbox') {
+ if (ImpMobile.currentPage('mailbox')) {
// Need to update history manually, because jqm exits too early
// if calling changePage() with the same page but different hash
// parameters.
@@ -245,8 +257,7 @@ var ImpMobile = {
ob.disappear(r.disappear);
}
- if ($.mobile.activePage &&
- $.mobile.activePage.attr('id') == 'mailbox') {
+ if (ImpMobile.currentPage('mailbox')) {
ImpMobile.refreshMailbox(ob);
}
},
@@ -360,8 +371,7 @@ var ImpMobile = {
return;
}
- if ($.mobile.activePage &&
- $.mobile.activePage.attr('id') == 'message') {
+ if (ImpMobile.currentPage('message')) {
// Need to update history manually, because jqm exits too early
// if calling changePage() with the same page but different hash
// parameters.
@@ -962,7 +972,7 @@ var ImpMobile = {
}
});
- if ($.mobile.activePage == $.mobile.firstPage) {
+ if (ImpMobile.currentPage('folders')) {
$('#imp-folders-list').listview('refresh');
}
},
@@ -1123,7 +1133,7 @@ var ImpMobile = {
});
}
- if ($.mobile.activePage != $.mobile.firstPage) {
+ if (location.hash) {
$.mobile.changePage(location.hash);
}
}

No commit comments for this range

Something went wrong with that request. Please try again.