vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   newlines added between html code (https://vborg.vbsupport.ru/showthread.php?t=193258)

mooreaa 10-10-2008 09:49 AM

newlines added between html code
 
Hello,

I enabled html code on my forum posts, and I added some code to post and noticed that it added line breaks on each line.

Is there a way I can prevent this or remove the line breaks from happenning?

Marco van Herwaarden 10-10-2008 10:07 AM

Can you post an example?

Lynne 10-10-2008 03:20 PM

I have html enabled in my Staff forums and I have noticed that everytime I go back to edit it, there are extra page breaks in the code. I don't know that you can do anything about it. I simple keep a copy of it in a text file, edit it there, and when I go to edit it in the Staff thread, I copy/paste it from my text file so it doesn't have all those extra spaces.

mooreaa 10-12-2008 05:11 AM

Here is an example post that I posted to my forums

Code:

if I post a html table

<table>
<tr>
<td>hello</td>
<td>world</td>
</tr>
<tr>
<td>line </td>
<td>2</td>
</tr>
</table>

Then the resulting output code it generates is this:

Code:

if I post a html table<br />

<br />
<table><br />
<tr><br />
<td>hello</td><br />
<td>world</td><br />
</tr><br />
<tr><br />
<td>line </td><br />
<td>2</td><br />
</tr><br />
</table><br />
<br />

Look at all the <br> tags on EACH line! I am using my forums to post articles and such some of which have forms so this really messes up the formatting.

The only way to fix this is to put all the code on a single line, but that makes it really hard/messy to edit... I'm not sure if there is a clean or easy way around this issue.

I am thinking I would like to just disable the auto newlines for now... but only on select forums...

Marco van Herwaarden 10-13-2008 08:22 AM

Does the same happen when you post here on vB.org?

mooreaa 10-13-2008 08:32 AM

html is not enabled here so I wouldn't know.

veenuisthebest 10-13-2008 08:41 AM

yes.. this is an old issue with HTML enabled in posts. Whenever you create a HTML table, it leaves lot of empty lines above as <br>'s are inserted.

A workaround with this problem, read Create a table within a post. Read the #4th post onwards there.

Thanks

P.S.: @Marco sir, I am not advertising. Its a solution for his problem.

mooreaa 10-13-2008 09:12 AM

my issue is not only with tables. Your solution to "switch" editor modes doesn't solve the underlying problem that unwanted <br/> are being inserted. I am looking for a way to track down where/why these are being inserted as I am using my forum to post articles and I will not be the only one trying to add html code.

Somewhere in the vbulletin's bb code parsing or postbit creation, these newlines are being added... where these are being added are not quite clear.

Marco van Herwaarden 10-13-2008 09:16 AM

Enabling HTML to be posted is a huge security risk, and i strongly suggest you do not enable it.

veenuisthebest 10-13-2008 09:17 AM

well I told you its just a workaround..

This problem IS an an old issue as I stated. Me too looking for a permanent solution for this.

Thanks


All times are GMT. The time now is 11:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01057 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete