{"id":7519,"date":"2013-05-11T00:03:01","date_gmt":"2013-05-10T22:03:01","guid":{"rendered":"http:\/\/www.chipwreck.de\/blog\/?p=7519"},"modified":"2013-05-11T00:03:01","modified_gmt":"2013-05-10T22:03:01","slug":"coda-php-web-toolkit-keep-single-quotes-with-csstidy","status":"publish","type":"post","link":"https:\/\/www.chipwreck.de\/blog\/2013\/05\/11\/coda-php-web-toolkit-keep-single-quotes-with-csstidy\/","title":{"rendered":"Coda PHP &#038; Web Toolkit: Keep single quotes with CSSTidy"},"content":{"rendered":"<p>My Coda plugin uses CSSTidy as a cleanup tool to (re)format CSS code. This works quite well, but it has a &#8220;feature&#8221; that isn&#8217;t always right: It removes single quotes from CSS. In this case the single quotes arond the url are removed:<\/p>\n<p><code><br \/>\n\tbackground:#333 url('images\/bg-stripes2.png') repeat 0 0;<br \/>\n<\/code><\/p>\n<p>In order to disable this behaviour here&#8217;s a quick workaround. Please note that updating the plugin removes this modification, so if I release the next version I hope I can add a configuration option for this but in the between time here&#8217;s how to quickly stop CSStidy from removing quotes:<\/p>\n<ul>\n<li>Open the finder and go to <kbd>(your user folder)\/Library\/Application Support\/Coda 2\/Plug-ins<\/kbd> (Or &#8220;\/Coda\/&#8221; for Coda 1)<\/li>\n<li>Right click on &#8220;PhpPlugin.codaplugin&#8221;, select &#8220;Show package contents&#8221;<\/li>\n<li>Now navigate to &#8220;Contents&#8221; and then to &#8220;Resources&#8221;, you&#8217;ll see all the support files for the Coda PHP plugin<\/li>\n<li>Find the file &#8220;csstidy.php&#8221; and open it with a Text Editor (I recommend TextMate or Coda itself)<\/li>\n<li>Go to line 2958 which reads: <kbd>$_cur_string = substr($_cur_string, 1, -1);<\/kbd><\/li>\n<li>Add two slashes before this line, like this: <kbd>\/\/ $_cur_string = substr($_cur_string, 1, -1);<\/kbd><\/li>\n<li>Save the file, exit and restart Coda and you&#8217;re done<\/li>\n<\/ul>\n<p>Of course making a backup of this file is recommended. If you totally screwed up something you can delete the plugin-file and reinstall it without problems :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My Coda plugin uses CSSTidy as a cleanup tool to (re)format CSS code. This works quite well, but it has a &#8220;feature&#8221; that isn&#8217;t always right: It removes single quotes from CSS. In this case the single quotes arond the url are removed: background:#333 url(&#8216;images\/bg-stripes2.png&#8217;) repeat 0 0; In order to disable this behaviour here&#8217;s &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.chipwreck.de\/blog\/2013\/05\/11\/coda-php-web-toolkit-keep-single-quotes-with-csstidy\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Coda PHP &#038; Web Toolkit: Keep single quotes with CSSTidy&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,38],"tags":[],"class_list":["post-7519","post","type-post","status-publish","format-standard","hentry","category-osx","category-updates"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paPEN-1Xh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/posts\/7519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/comments?post=7519"}],"version-history":[{"count":0,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/posts\/7519\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/media?parent=7519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/categories?post=7519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chipwreck.de\/blog\/wp-json\/wp\/v2\/tags?post=7519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}