Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positives on img with new lines on src value #506

Closed
cetinajero opened this issue Jan 19, 2019 · 1 comment
Closed

False positives on img with new lines on src value #506

cetinajero opened this issue Jan 19, 2019 · 1 comment

Comments

@cetinajero
Copy link

cetinajero commented Jan 19, 2019

Hi Garen,

I came across an issue when an img tag has this structure:

<img src="
https://grupopv-public.s3.amazonaws.com/assets/img/catalog/thumbnails/radios/motorola/licenses/smart-ptt/spttc0003.png
" class="img-center" alt="SPTTC0003" />

As you can see there are new lines at the start and end of the src value, and if you see closely there are even some spaces too, this is a common scenario when using Liquid variables, tags & filters.

Edgars-MacBook-Pro:spttc0003 cetinajero$ cat index.html | od -c
0000000                                            <   i   m   g       s
0000020    r   c   =   "  \n                                           h
0000040    t   t   p   s   :   /   /   g   r   u   p   o   p   v   -   p
0000060    u   b   l   i   c   .   s   3   .   a   m   a   z   o   n   a
0000100    w   s   .   c   o   m   /   a   s   s   e   t   s   /   i   m
0000120    g   /   c   a   t   a   l   o   g   /   t   h   u   m   b   n
0000140    a   i   l   s   /   r   a   d   i   o   s   /   m   o   t   o
0000160    r   o   l   a   /   l   i   c   e   n   s   e   s   /   s   m
0000200    a   r   t   -   p   t   t   /   s   p   t   t   c   0   0   0
0000220    3   .   p   n   g  \n                                   "    
0000240    c   l   a   s   s   =   "   i   m   g   -   c   e   n   t   e
0000260    r   "       a   l   t   =   "   S   P   T   T   C   0   0   0
0000300    3   "       /   >  \n                                        
0000306

When html-proofer test a node like this it fails in reporting errors and because of this, my CI tests are reporting false positives.

cetinajero added a commit to grupopv/html-proofer that referenced this issue Jan 19, 2019
@gjtorikian
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants