当 W3C 验证我的页面时,我收到以下错误:
Bad value /~/media/Image Libraries/Carousel Images/sea.jpg?w=652&h=263&bc=transparent&as=1&thn=1 for attribute src on element img: Whitespace in path component. Use %20 in place of spaces.
管道中是否有某个地方或者我在渲染这些链接之前更改了它们?
编辑:
这是一个示例图像标签:
<img width="257" height="155" src="/~/media/Image Libraries/Section Pods/headphonewoman.jpg?w=257&h=155&bc=transparent&as=1&thn=1" alt="Administration">
这是确切的错误:
Error Line 565, Column 218: Bad value /~/media/Image Libraries/Carousel Images/office.jpg?w=652&h=263&bc=transparent&as=1&thn=1 for attribute src on element img: Whitespace in path component. Use %20 in place of spaces.
…ages/office.jpg?w=652&h=263&bc=transparent&as=1&thn=1" />
Syntax of IRI reference:
Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.
我们还尝试添加一个覆盖其中的管道,GetMediaUrl
但这Sitecore.Resources.Media.MediaProvider
无济于事。