Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6c6e4515
Commit
6c6e4515
authored
Jun 24, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Jun 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: The SRC value returned from HTMLElement_getAttribute should be an…
mshtml: The SRC value returned from HTMLElement_getAttribute should be an absolute, not relative URL.
parent
0e4ccb82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
htmlelem.c
dlls/mshtml/htmlelem.c
+27
-3
No files found.
dlls/mshtml/htmlelem.c
View file @
6c6e4515
...
...
@@ -26,8 +26,10 @@
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "winnls.h"
#include "ole2.h"
#include "shlwapi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -149,6 +151,8 @@ static HRESULT WINAPI HTMLElement_getAttribute(IHTMLElement *iface, BSTR strAttr
WARN
(
"(%p)->(%s %08x %p)
\n
"
,
This
,
debugstr_w
(
strAttributeName
),
lFlags
,
AttributeValue
);
VariantInit
(
AttributeValue
);
nsAString_Init
(
&
attr_str
,
strAttributeName
);
nsAString_Init
(
&
value_str
,
NULL
);
...
...
@@ -156,10 +160,30 @@ static HRESULT WINAPI HTMLElement_getAttribute(IHTMLElement *iface, BSTR strAttr
nsAString_Finish
(
&
attr_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
static
const
WCHAR
wszSRC
[]
=
{
's'
,
'r'
,
'c'
,
0
};
nsAString_GetData
(
&
value_str
,
&
value
,
NULL
);
V_VT
(
AttributeValue
)
=
VT_BSTR
;
V_BSTR
(
AttributeValue
)
=
SysAllocString
(
value
);
TRACE
(
"attr_value=%s
\n
"
,
debugstr_w
(
V_BSTR
(
AttributeValue
)));
if
(
!
strcmpiW
(
strAttributeName
,
wszSRC
))
{
WCHAR
buffer
[
256
];
DWORD
len
;
BSTR
bstrBaseUrl
;
hres
=
IHTMLDocument2_get_URL
(
HTMLDOC
(
This
->
node
->
doc
),
&
bstrBaseUrl
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
CoInternetCombineUrl
(
bstrBaseUrl
,
value
,
URL_ESCAPE_SPACES_ONLY
|
URL_DONT_ESCAPE_EXTRA_INFO
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
),
&
len
,
0
);
SysFreeString
(
bstrBaseUrl
);
if
(
SUCCEEDED
(
hres
))
{
V_VT
(
AttributeValue
)
=
VT_BSTR
;
V_BSTR
(
AttributeValue
)
=
SysAllocString
(
buffer
);
TRACE
(
"attr_value=%s
\n
"
,
debugstr_w
(
V_BSTR
(
AttributeValue
)));
}
}
}
else
{
V_VT
(
AttributeValue
)
=
VT_BSTR
;
V_BSTR
(
AttributeValue
)
=
SysAllocString
(
value
);
TRACE
(
"attr_value=%s
\n
"
,
debugstr_w
(
V_BSTR
(
AttributeValue
)));
}
}
else
{
ERR
(
"GetAttribute failed: %08x
\n
"
,
nsres
);
hres
=
E_FAIL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment