Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Textpattern tag to trim whitespace?
For years with TextPattern there has been lots of gratuitous whitespace (newlines) in my generated HTML as a side-effect of my textpattern tags in pages & forms and my organized those to be easily readable / editable. .
I’m beginning to wish there was a better way… some of my more complex pages are littered with unnecessary whitespace. Does anybody have a solution?
I was wondering perhaps if there could be a tag pair that could trim extra whitespace for anything between the tags (consecutive whitespace characters)?
Offline
Re: Textpattern tag to trim whitespace?
Theres a few ways…. have a read through this thread on removing whitespace
Offline
Re: Textpattern tag to trim whitespace?
Offline
Re: Textpattern tag to trim whitespace?
If you have full access to your web server, you can use mod_pagespeed for trimming whitespace and other speed improvements. I use that, works great.
Offline
Re: Textpattern tag to trim whitespace?
I’ve had great success with rah_replace@ overall. Some inline JavaScript can get a little twitchy and break (jPlayer, in my case), but other than that it’s fantastic.
Offline
Pages: 1