[haiku-bugs] Re: [Haiku] #12163: WebPositive error on img tag between <a></a> tags

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Tue, 16 Jun 2015 06:52:12 -0000

#12163: WebPositive error on img tag between <a></a> tags
----------------------------------------+----------------------------
Reporter: haiqu | Owner: pulkomandy
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Applications/WebPositive | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
----------------------------------------+----------------------------

Comment (by pulkomandy):

"an error" isn't very descriptive of what you get. Let me grab my crystal
ball...

I think you get a parse error because Web+ detected your file or page as
xhtml and you are trying to write html. For remote files Web+ will use the
mime type given in the HTTP headers. For local files it will use the
mimetype attribute of the file. That attribute is set by the mime sniffing
rules (you can see them in preferences/filetypes), but the detection is
not perfect and will sometimes mistake html for xhtml. You can manually
adjust the attribute (use listattr, catattr, and setattr in terminal to
experiment with attributes) and set the correct mime type.

Correct code in xhtml could be (notice the / at the end to close the img):

{{{
<img src="/home/furius-logo-w.png" id="logo"/>
}}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/12163#comment:1>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: