{"action":"created","issue":{"url":"https://api.github.com/repos/websharks/zencache/issues/651","labels_url":"https://api.github.com/repos/websharks/zencache/issues/651/labels{/name}","comments_url":"https://api.github.com/repos/websharks/zencache/issues/651/comments","events_url":"https://api.github.com/repos/websharks/zencache/issues/651/events","html_url":"https://github.com/websharks/zencache/issues/651","id":125399327,"number":651,"title":"Feature Request: URI Exclusions for HTML Compressor","user":{"login":"raamdev","id":53005,"avatar_url":"https://avatars.githubusercontent.com/u/53005?v=3","gravatar_id":"","url":"https://api.github.com/users/raamdev","html_url":"https://github.com/raamdev","followers_url":"https://api.github.com/users/raamdev/followers","following_url":"https://api.github.com/users/raamdev/following{/other_user}","gists_url":"https://api.github.com/users/raamdev/gists{/gist_id}","starred_url":"https://api.github.com/users/raamdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raamdev/subscriptions","organizations_url":"https://api.github.com/users/raamdev/orgs","repos_url":"https://api.github.com/users/raamdev/repos","events_url":"https://api.github.com/users/raamdev/events{/privacy}","received_events_url":"https://api.github.com/users/raamdev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/websharks/zencache/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/websharks/zencache/labels/html%20compressor","name":"html compressor","color":"009800"},{"url":"https://api.github.com/repos/websharks/zencache/labels/pro","name":"pro","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-07T14:01:15Z","updated_at":"2016-01-15T07:14:31Z","closed_at":null,"body":"@renzms writes in https://github.com/websharks/zencache/issues/650#issue-125337944...\r\n> some site owners may choose not to use HTML Compression for certain URLs.\r\n> \r\n> There should be a filter to list down specific URLs to exclude from HTML Compression.\r\n> \r\n> Referencing Internal Ticket: https://websharks.zendesk.com/agent/tickets/10412\r\n\r\nWe currently have JavaScript and CSS Exclusion options in the HTML Compressor; a new \"URI Exclusion Patterns\" section sounds like a good idea to me."},"comment":{"url":"https://api.github.com/repos/websharks/zencache/issues/comments/171889127","html_url":"https://github.com/websharks/zencache/issues/651#issuecomment-171889127","issue_url":"https://api.github.com/repos/websharks/zencache/issues/651","id":171889127,"user":{"login":"renzms","id":13220018,"avatar_url":"https://avatars.githubusercontent.com/u/13220018?v=3","gravatar_id":"","url":"https://api.github.com/users/renzms","html_url":"https://github.com/renzms","followers_url":"https://api.github.com/users/renzms/followers","following_url":"https://api.github.com/users/renzms/following{/other_user}","gists_url":"https://api.github.com/users/renzms/gists{/gist_id}","starred_url":"https://api.github.com/users/renzms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renzms/subscriptions","organizations_url":"https://api.github.com/users/renzms/orgs","repos_url":"https://api.github.com/users/renzms/repos","events_url":"https://api.github.com/users/renzms/events{/privacy}","received_events_url":"https://api.github.com/users/renzms/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T07:14:31Z","updated_at":"2016-01-15T07:14:31Z","body":"## Step 1 \r\n\r\n- New feature branch in the `websharks/zencache-pro` repo.\r\n\r\n- After [this line](https://github.com/websharks/zencache-pro/blob/000000-dev/src/includes/classes/Plugin.php#L312) add two new option keys.\r\n\r\n  ```php\r\n  'exclude_uris_html_compressor'   => '0', // `0|1` enable?\r\n  'exclude_html_compressor_uris' => '', // Line-delimited list of URIs.\r\n  ```\r\n\r\n- After [this line](https://github.com/websharks/zencache-pro/blob/000000-dev/src/includes/closures/Plugin/InstallUtils.php#L295) add the following:\r\n\r\n  ```php\r\n  case 'exclude_html_compressor_uris': // Converts to regex (caSe insensitive).\r\n  ```\r\n\r\n- After [this line](https://github.com/websharks/zencache-pro/blob/000000-dev/src/includes/closures/Plugin/InstallUtils.php#L290) add the following:\r\n\r\n  ```php\r\n  if ($self->options['exclude_uris_html_compressor']) {\r\n      $possible_advanced_cache_constant_key_values['exclude_uris_html_compressor'] .= \"\\n\".$self->options['exclude_uris'];\r\n  }\r\n  ```\r\n\r\n- After [this line](https://github.com/websharks/zencache-pro/blob/000000-dev/src/includes/templates/advanced-cache.txt#L165) add the following:\r\n\r\n  ```php\r\n  if (!defined('ZENCACHE_EXCLUDE_HTML_COMPRESSOR_URIS')) {\r\n      /**\r\n       * HTML Compressor URI exclusions.\r\n       *\r\n       * @since 15xxxx Adding support for HTML Compressor URI exclusions.\r\n       *\r\n       * @var string A regular expression; else an empty string.\r\n       */\r\n      define('ZENCACHE_EXCLUDE_HTML_COMPRESSOR_URIS', '%%ZENCACHE_EXCLUDE_HTML_COMPRESSOR_URIS%%');\r\n  }\r\n  ```\r\n\r\nAdd UI option for:\r\n\r\n`exclude_html_compressor_uris'\r\n\r\n\r\n- Submit PR."}}