HTML Compactor

J

Jeremy Ross

Hello,

I am looking for a program that will compact my HTML, so its all one one
line, I have seen many of these programs around before but am now unable to
find one that does this. If anyone knows of one that would be great.

Thanks,

Jeremy Ross
 
D

David Dorward

Jeremy said:
I am looking for a program that will compact my HTML, so its all one one
line, I have seen many of these programs around before but am now unable
to find one that does this.

perl -p -e's/\n/\ /' my.html

.... utterly pointless of course.

(get Perl from http://www.activestate.com/ if you don't have it already)
 
D

David Dorward

Probably to "hide" it or make it difficult to view source.

Which is pointless since:
(a) Good HTML is *very* simple and not worth copying
and
(b) HTML Tidy can make it readable again rather quickly
 
M

Michael Laplante

Jeremy Ross said:
Hello,

I am looking for a program that will compact my HTML, so its all one one
line, I have seen many of these programs around before but am now unable to
find one that does this. If anyone knows of one that would be great.

FWIW, Notetab Lite (free from www.notetab.com) will do this. Use the replace
function to replace "^p" with nothing and you're done.

M
 
J

Jeremy Ross

Hello,

The real reason for wanting something like this, is because there is a
program that uses the nl2br function in php, witch creates a <br> tag at
every new line, now i am placing a table inside this function, witch is
formated wiht each cell on a new line, so there are loads of <br> tages
being placed in the code, and the table is moving down many lines because of
this.

I need that program to make it all on one line so there are no <br> tags
being placed.

Thanks,
Jeremy
 
M

marcus

I need that program to make it all on one line so there are no <br> tags
being placed.

In that case you don't need compaction, you need to edit the file and delete
some of the BR tags.

regards
Marcus
 
O

Oli Filth

Jeremy said:
Hello,

The real reason for wanting something like this, is because there is a
program that uses the nl2br function in php, witch creates a <br> tag at
every new line, now i am placing a table inside this function, witch is
formated wiht each cell on a new line, so there are loads of <br> tages
being placed in the code, and the table is moving down many lines because of
this.

I need that program to make it all on one line so there are no <br> tags
being placed.

Or you should stop using the program that's replacing all newlines with
<br>. Why are you using such a thing?
 
D

dorayme

From: "Jeremy Ross said:
Newsgroups: alt.html
Date: Fri, 11 Mar 2005 12:57:18 GMT
Subject: Re: HTML Compactor

Hello,

The real reason for wanting something like this, is because there is a
program that uses the nl2br function in php, witch creates a <br> tag at
every new line, now i am placing a table inside this function, witch is
formated wiht each cell on a new line, so there are loads of <br> tages
being placed in the code, and the table is moving down many lines because of
this.

I need that program to make it all on one line so there are no <br> tags
being placed.

Thanks,
Jeremy


You saying you just want to remove some text? Do a global find <br> and
replace with nothing at all... Using a text editor? Try command F or alt F
or control F or look up the menus for this function... In mine, for example,
one can change all instances in docs in a folder, I'm sure you would be able
to.

dorayme
 
S

Sid Ismail

: > From: "Jeremy Ross" <[email protected]>
: > Newsgroups: alt.html
: > Date: Fri, 11 Mar 2005 12:57:18 GMT
: > Subject: Re: HTML Compactor
: >
: > Hello,
: >
: > The real reason for wanting something like this, is because there is a
: > program that uses the nl2br function in php, witch creates a <br> tag at
: > every new line, now i am placing a table inside this function, witch is
: > formated wiht each cell on a new line, so there are loads of <br> tages
: > being placed in the code, and the table is moving down many lines because of
: > this.
: >
: > I need that program to make it all on one line so there are no <br> tags
: > being placed\0\0\0: >
: > Thanks,
: > Jeremy
:
:
: You saying you just want to remove some text? Do a
 
S

SpaceGirl

Jeremy said:
Hello,

I am looking for a program that will compact my HTML, so its all one one
line, I have seen many of these programs around before but am now unable to
find one that does this. If anyone knows of one that would be great.

Thanks,

Jeremy Ross

You have to be careful using programs that do this. Sadly, some browsers
(ahem, IE) are sensitive to line breaks. Remove line breaks in nested
tables (for example) can cause "gaps" to appear or disappear.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top