X
Tap here to go to the mobile version of the site.

Support Forum

Disable auto closing of (HTML etc.) tags?

Posted

Is there a way to prevent Firefox trying to be helpful and close tags that aren't closed in code?

We are trying to trace a problem with code built from from about 10 different templates and finding where a missing tag is difficult when the browser keeps closing them. - The page is only "built" just before being delivered to the browser.

I appreciate I am in a minority, but I would rather my development browser fail to render the page instead helping by inserting unclosed tags, in this case in the wrong place hence why we noticed the problem.

Many thanks.

Is there a way to prevent Firefox trying to be helpful and close tags that aren't closed in code? We are trying to trace a problem with code built from from about 10 different templates and finding where a missing tag is difficult when the browser keeps closing them. - The page is only "built" just before being delivered to the browser. I appreciate I am in a minority, but I would rather my development browser fail to render the page instead helping by inserting unclosed tags, in this case in the wrong place hence why we noticed the problem. Many thanks.

Chosen solution

Are you using the Inspector? In order to build a DOM for you to view, Firefox does sometimes have to guess/decide the boundaries of different elements. So you're right: this view is not useful for your purposes, except that seeing the boundaries in the wrong places may provide important clues.

To see the raw source sent by the server, you can always use Ctrl+u or right-click > View Page Source (not View Selection Source, clear the selection in that case). It's usually ugly, but you could try using a validator to analyze it if pasting it into a syntax-highlighting editor doesn't help you resolve the issue.

Now... if you retrieve HTML in the background and insert it into the page, that is not in the original source. If you use the Network Monitor, you should be able to view the actual server responses to individual AJAX requests. See: https://developer.mozilla.org/docs/Tools/Network_Monitor

Read this answer in context 0

Additional System Details

Installed Plug-ins

  • Adobe PDF Plug-In For Firefox and Netscape 15.10.20056
  • Creative Cloud Desktop Plugin.v_3_0_0_0
  • Amazon MP3 Downloader Plugin 1.0.18
  • Google Update
  • Intel web components for Intel® Identity Protection Technology
  • Intel web components updater - Installs and updates the Intel web components
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Next Generation Java Plug-in 11.77.2 for Mozilla browsers
  • The plugin allows you to have a better experience with Microsoft Lync
  • The plugin allows you to have a better experience with Microsoft SharePoint
  • NVIDIA 3D Vision Streaming plugin for Mozilla browsers
  • NVIDIA 3D Vision plugin for Mozilla browsers
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • 5.1.41212.0
  • Plugin for Wacom tablets.

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

More Information

jscher2000
  • Top 10 Contributor
8758 solutions 71662 answers

Chosen Solution

Are you using the Inspector? In order to build a DOM for you to view, Firefox does sometimes have to guess/decide the boundaries of different elements. So you're right: this view is not useful for your purposes, except that seeing the boundaries in the wrong places may provide important clues.

To see the raw source sent by the server, you can always use Ctrl+u or right-click > View Page Source (not View Selection Source, clear the selection in that case). It's usually ugly, but you could try using a validator to analyze it if pasting it into a syntax-highlighting editor doesn't help you resolve the issue.

Now... if you retrieve HTML in the background and insert it into the page, that is not in the original source. If you use the Network Monitor, you should be able to view the actual server responses to individual AJAX requests. See: https://developer.mozilla.org/docs/Tools/Network_Monitor

Are you using the Inspector? In order to build a DOM for you to view, Firefox does sometimes have to guess/decide the boundaries of different elements. So you're right: this view is not useful for your purposes, except that seeing the boundaries in the wrong places may provide important clues. To see the raw source sent by the server, you can always use Ctrl+u or right-click > View Page Source (not View Selection Source, clear the selection in that case). It's usually ugly, but you could try using a validator to analyze it if pasting it into a syntax-highlighting editor doesn't help you resolve the issue. Now... if you retrieve HTML in the background and insert it into the page, that is not in the original source. If you use the Network Monitor, you should be able to view the actual server responses to individual AJAX requests. See: https://developer.mozilla.org/docs/Tools/Network_Monitor

Question owner

Thank you Jscher, being able to view the source like that is just what we need.

It would have been nice if the inspector had an option for it, but I can drop the code into an editor and work through it.

Thank you!

Thank you Jscher, being able to view the source like that is just what we need. It would have been nice if the inspector had an option for it, but I can drop the code into an editor and work through it. Thank you!