cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trouble with eBays Listing Editor causing HTML and CSS issues

I have been battling this issue for quite awhile.  I recently decided to try using Blue Griffon HTML editor to clean the HTML code that eBays listing tool has flubbed up over time and make sure it was as close to correct according to HTML standards as i can with my knowledge.  I have contacted eBay and they are looking into it, but like many other people with similar problems, i really do not expect them to fix it or come up with a fix.

 

I am trying to copy the HTML from my 3rd party editor into the HTML tab of the listing and then without looking at the standard preview, submit the changes to preserve the proper HTML to make it look as it should.  It should work down to 320px width decently.

 

The other day, i created a "test" listing so i could try things without messing up my actual listings.  I chose one of my listings, then "sell similar" and then copy/pasted the html into the html box, listed it and somehow it worked, although there were a few things i needed to change to work below 480px width properly.  So today i made those changes, clicked on "revise listing" and am pretty sure i am using the same code except with minor internal changes for max-width on the video/images and for some reason it is not working now.  It is stripping my CSS and causing issues.

 

If you compare the code below just opened in a browser to the ebay listing #223327504714 you should be able to see what i am talking about.

 

Please help if anyone has any ideas!

 

I will have to break the HTML into a couple posts to stay within allowed 20,000 character posts.

Message 1 of 42
latest reply
41 REPLIES 41

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

@wolfesmetalfabrication

 

I don't know if this will work with your browser combination...

 

If you first paste your virgin HTML into Notepad and then "select all" and copy out of Notepad, that usually gets rid of underlying "pretty code" formatting that HTML editors include to [rich-text] color code your markup. However, the problem is that eBay also uses a "pretty code" rich-text editor on their markup box. So we see problems in some browsers when pasting from one rich-text HTML view to another rich-text HTML view, where hard spaces may be introduced.

 

It's not just eBay. Any other platform that allows text editing may use the same open source editor core (CKE, TinyMCE, etc) that then relies on the code-editing features built into the browser.  If you change browsers, you'll probably see your HTML attributes shift around to suit that browser's preferences, and that is why different browsers perform differently in eBay's editor.

 

It appears to me as if Firefox has overcome the issue. Over the years, I've seen differences in how that browser interacts with the rich-text-editor, and specifically see differences in the way it presents the source view of pages. It used to show me all hard spaces, but in the screenshot I provided, it displayed the text hard spaces as    but  did not show me the hard spaces in your stylesheet. Yet, character examination showed hard spaces (alt-0160) were also embedded in your styles.

 

As for fixing what is already broken, I wrote a filter for you to strip out those hard spaces.  The link will take you to the Active Content Sandbox tool and will prepopulate the tool with your test listing and your custom filter.

 

The filter will look for space-like characters at the front of lines (tab, space, hard-spaces) and will replace those with nothing. It will then look for the same characters (or runs of characters) within the code and will replace those with a single soft space.

 

You can reformat other listing codes by changing the item number in the top box of the Sandbox tool, or you can paste your entire HTML in the top box, and then click the SCAN button. Your results will be found in the "Filtered" tab, where you can preview to make sure the videos and other elements are correctly formatted.

 

The extensive hashing of the filter means that the default scans that are normally run by the tool may not find results. But there is one "violation" you will need to fix. The link at the bottom is missing the target attribute, which you should add as shown below.

 

<div style="text-align: center;"> <a href="https://feedback.ebay.com/ws/eBayISAPI.dll?ViewFeedback2&amp;userid=wolfesmetalfabrication" target="_blank">Check out the rest of Our Great Feedback!</a> </div>

 

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 16 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

@shipscript if eBay isn't paying you, they should be, you have helped more in your couple of posts than multiple phone calls and many hours on the phone, sill awaiting a call back from someone who might be able to help.

 

I will try the stuff you mentioned hopefully this weekend or early next week.  Behind on too many orders at the moment.

 

I may have to try Firefox for the ebay thing also, i used to use it all the time and then switched to Chrome.

 

I am aware of the notepad copy/paste as i use it alot already in many instances, even copying stuff from the internet to put into an email.

 

The added NBSP are probably the majority of the problem and hopefully with your filter i can take care of that.  I tried using a few online tools, like tidyhtml?? and others but there was always a problem with them changing some of the code it shouldn't or something weird like making a new UL for every LI item even when all i was trying to do was remove the extra whitespace.

 

I already have used that website for fixing videos, although i did find a problem with it for viewports under 480px as width was set at 480px, so i changed the output code to max-width 480px and it fixed that problem.

 

I dont understand your input custom code filter at all, but i will give it a shot and make some good notes if it works.

 

Thanks,

Brian

Message 17 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

@shipscript I decided to try a quick test with the code in your tool and updating that listing

https://www.ebay.com/itm/223327504714

compared to code input on a hidden page on my website

(not changed for eBay to exclude whitespaces, just original code w/ html and header tags before eBay edits we have done)

https://wolfesmetalfabrication.com/ebay223327504714propercodetest.html

 

It is good that the NBSP disappeared, but i know atleast some of the CSS isn't working properly because....

 

1. The H1 header at the top "Easy Shrink Shrinking Discs" is centered in the CSS and is not on the page.

2. The HR style is not being applied.

3. The video css formatting is not being applied.

 

and a different (possibly) problem that i have also noticed is it puts a vertical scrollbar into my listing??? Not sure if that has something to do with the listing designer that i can't remove now without making a new listing, or what?  Ive browsed my code and am pretty sure nothing in it would be needing/requesting the vertical scrollbar.

 

So we have made some progress, atleast the NBSP are not causing major issues, but i would like to solve the minor missing CSS things if at all possible.  If not, i can center the H1 in the tag, i could probably go without the HR style (but i dont want to) and i would have to figure out how to make the video format with text to look and work better.

 

FYI, I have not reviewed it with a finetooth comb, just quick browsing for now.

 

Brian

Message 18 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

I was wondering why the extra styles were hard-coded into the video elements. The max-width:480px is already in the stylesheet. Perhaps when the styles were broken, the code was not being applied and required you to manually add them again since the default image from YouTube is 480 wide and had forced that width.

 

You shouldn't need to hard-code the element styles now that the stylesheet is repaired.

 

This is how the video code normally appears when created (I'll break it apart a little so it can be read more easily):

<!-- BEGIN LINKED VIDEO -->
<div class="ytvideo">
<a target="_blank" href="https://www.youtube.com/embed/rt07pLebQwQ?rel=0">
<img src="https://img.youtube.com/vi/rt07pLebQwQ/0.jpg"></a>
<p class="yt_hd">Dent Repair, Metal Bumping &amp; Shrinking with a Wolfes Metal Fabrication &quot;Easy Shrink&quot;â„¢ Shrinking Disc - YouTube</p>
<p class="yt_ft">Video will open in a new window
Using the eBay App? Paste link into a browser window:</p>
<span class="yt_tag" style="display:none">[isdntekvideo]</span>
<input class="yt_inp" type="text" value="https://www.youtube.com/embed/rt07pLebQwQ?rel=0">
</div>
<style> .ytvideo * { box-sizing:border-box; } 
.ytvideo { margin:.5em auto 40px auto; max-width:480px; font-family:arial; text-align:center; position:relative; min-height:120px; background-color:#555; } 
.ytvideo p { position:absolute; margin:0; color:white; background-color:rgba(0,0,0,.5); } 
.ytvideo .yt_hd { font-size:16px; width:100%; height:28px; line-height:28px; text-align:left; top:0; left:0; padding-left:10px; overflow:hidden; }
.ytvideo .yt_ft { font-size:12px; width:100%; bottom:0; left:0; }
.ytvideo img { display:block; max-width:100%; border:0; } 
.ytvideo a:after { content:"\A0\25BA"; position:absolute; width:60px; height:50px; left:0; top:0; right:0; bottom:0; margin:auto; border:0; border-radius:10px; color:white; background:rgba(0,0,0,.6); font-size:24px; line-height:50px; cursor:pointer; } 
.ytvideo a:hover:after { background:#CC181E; } 
.ytvideo .yt_inp { position:absolute; top:100%; left:0; width:100%; text-align:center; padding:.5em .2em; xfont-size:18px; border:0; color:white; background: rgba(0,0,0,.7); } 
@media(max-device-width:960px){ 
.ytvideo { margin-bottom:60px; } 
.ytvideo .yt_inp { padding:1em .2em; } } </style>
<!-- END LINKED VIDEO -->

If you return to the default video code and still see a width issue in Chrome, please let me know.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 19 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

I found 10 more hard spaces in your new code, all within the stylesheet at the end of some lines. I tested the "filtered" code and did not detect them there. Let me do some more testing.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 20 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

@wolfesmetalfabrication

 

Here is the link showing the 10 extra hard spaces. The filter was written to detect and remove those 10 hard spaces instead of replacing with a soft space.

 

Because the original eBay source is now gone, I can't go back and figure out if they were missed or reintroduced, or how to modify the original filter.

 

Take a look at the "Markup" window to find the 10 instances so that you will know where they occurred. Each is at the end of a line, meaning they connect to the front of the next line and void out the next line or "style rule". Those are all the styles that were affected.  The "Filtered" tab removes those hard-spaces entirely, rather than replacing them with a soft space, so don't use this filter for anything else.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 21 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

Looks like shipscript has you on the right path.

Notepad++ editor can do many useful things, and dealing with leading spaces is one of them.

Another possibility for stripping leading spaces in the eBay editor HTML tab after pasting your HTML in might be my Replace-O-Matic tool. It's a RegEx capable Autohotkey search and replace script that is hotkey actuated. I've provided a precompiled standalone version of it also that doesn't require having Autohotkey framework installed.

How it would be used in this context would be that you would fire up the program which would then lurk in the windows tray, right click on the tray icon and enable use of RegEx, paste your HTML in the eBay description editor HTML tab, hit the Alt-Win-X key combo, enter a RegEx search string like ^[ \t]* , enter nothing for the replace string, and it should strip the leading whitespace from the HTML in the HTML tab.

 

If no text is selected, it selects all and operates on that. If text is already selected, it only operates on what you selected.


The search and replace strings are sticky - as long as the script stays running they will be pre-filled in the dialogs, and you just Alt-Win-X and whack the enter key twice after the first time to fix up subsequent listings. If you install Autohotkey. you can run the script instead of the precompiled exe, and edit the script yourself to change defaults such as making it start up in RegEx search mode, etc. Or I can compile a modified version for you.

And it works anywhere it can grab text - in any in-browser editor or text field, in Notepad, in MS Word, wherever. Even useful for counting things like the number of items a seller has on an eBay search results page - if you enter the seller name as the search and anything for the replace it will do a phantom replace (it can't actually replace static text not in an edit box), and tell you how many it thinks it did.

Links to the most current version are in this thread:
https://community.ebay.com/t5/Selling/REMOVING-quot-LINKS-quot-from-eBay-listings/m-p/27522643/highl...
and original post with some explanation is here:
https://community.ebay.com/t5/Selling/Here-we-go-again-quot-Changes-to-Chrome-will-affect-your/m-p/2...

Message 22 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

EDIT:  I appologize, i didn't realize you had responded on page 2 until just now, so i will take a look at the info there first.

 

 

@shipscript Did you have a chance to look at it further yet, or been busy?

 

I had some success as i mentioned, but still some issues that i mentioned also.

 

I have been working on Tax stuff here instead of the listing issues, but as soon as i get a deadline met, i will be switching back to listing fixing.

 

Brian

Message 23 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

Which eBay source are you talking about that is gone?

 

It still shows me that the test listing is up.

https://www.ebay.com/itm/223327504714

Message 24 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

I have revised the above ebay Test listing with the filtered code.  It appears to be working correctly.  So if it is, i just need to do the final look over for typos, etc. and then make sure i made all the necessary changes in my HTML editor, save the final fixed one, and then make a bunch of notes with links and info to the filtering tool you showed me for future listings.

 

If you were talking about the original code being gone, the code on my website...

https://wolfesmetalfabrication.com/ebay223327504714propercodetest.html

 

....Should still be the code from before you filtered it in the tool, i dont think i ever re-uploaded it, as eBay was the only place it was showing problems and the link above is just for testing purposes as well to show that it was working fine off of ebay.  I will delete it once we are done solving the problem.

 

It would just be nice if somehow ebay could incorporate a more user friendly method of using HTML in their listing editor, or just a plain upload HTML file link where it (or the browser) couldn't even touch or alter the code.

 

I am not familiar with the regular expressions searching code or whatever it is called, so i will have to do some learning if i am going to use it to know what it all means instead of having to bug you guys if i have another problem.

 

Thanks, i greatly appreciate your time and effort in helping me troubleshoot this problem!

Brian

Message 25 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

@berserkerplanet i do have notepad ++ and have experimented with it a little bit.  Can you further explain how you use it to deal with extra whitespaces?  I dont think i noticed that option or was able to locate it.

 

Do you think it would work instead of doing Shipscripts method of filtering the whitespaces, or just for the leading ones?

 

I do like having software solutions instead of a link if possible in case the webpage changes or disappears.

 

Brian

Message 26 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

@wolfesmetalfabrication

 


wolfesmetalfabrication wrote:

Which eBay source are you talking about that is gone?

It still shows me that the test listing is up.

https://www.ebay.com/itm/223327504714


Yes, your new code is there and it looks like the listing is now completely repaired. My concern was that I no longer had access to the clobbered code because you have repaired it; thus, when I had missed one detail in the clobbered code, I had no way to determine how I could adjust the filter I had given you.

 

But no matter. I decided to take the compression algorithms from some of my other programs and create an online utility that would do the same thing. The utitility will have a plain text input box and will then be able to strip off the leading spaces and hard spaces and reduce space-like characters to a single soft space. It would also reduce text for File Exchange. I think I should be able to post that tool tonight.

 

That would allow you to paste code from your rich-text tool into the plain text box, click a button to align and purge, and then copy/paste the new code back into your listing.  Hopefully, it will also be able to process clobbered code.

 

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 27 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues


wolfesmetalfabrication wrote:

It would just be nice if somehow ebay could incorporate a more user friendly method of using HTML in their listing editor, or just a plain upload HTML file link where it (or the browser) couldn't even touch or alter the code.


eBay's File Exchange will accept a spreadsheet upload so that the browser is never involved. However, the description for the spreadsheet must have all linebreaks removed so that the description is one long run of code.

 

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 28 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

>> i do have notepad ++ and have experimented with it a little bit.  Can you further explain how you use it

>>to deal with extra whitespaces?  I dont think i noticed that option or was able to locate it.

I don't have your specific issue so don't use it to deal with extra whitespace, but do use it for general manipulations (complex reformattings and search/replaces, etc)

There are a million forks/versions of Notepad++. Some have certain features, some had them, some based on plugins, etc. I use older versions because I can't be bothered to update, and get tired of things changing. I mostly use v5.6.8

One thing you can/should do in Notepad++ when working these issues is use the View menu option "show symbol" and turn on "show whitespace and tabs" - gives you a visual of what is going on.

In the version I have there is no direct menu "trim leading spaces", but a RegEx search/replace does the trick, and could possibly be made into a macro in Notepad++ to become a menu/hotkey option.

Ctrl-Home to be sure at top of document, Ctrl-H to pull up search/replace, make sure it's RegEx flavor,

search for ^[ \s]   , replace with nothing, and leading spaces and tabs are gone.

(It will remember that search/replace)

 

Or use a search for  ^[ \s\xa0]   to also attack leading hard spaces.

 

Notepad++ also has macro recording capabilities (I haven't used), plugins, ability to run python with a plugin, ability to run npp scripts, etc There are tons of scripts, examples, and help avail by googling, especially on Stack Exchange. (ie: google for notepad++ strip leading spaces)

 

Another very powerful general purpose tool that can operate on files (or maybe clipboard contents - haven't explored that) is Swiss File Knife via batch file invocation. http://stahlworks.com/dev/swiss-file-knife.html   Syntax is terse and complex, but it can really do stuff.

As I said previously, my Replace-o-matic compiled script, which is standalone, can do a similar thing, and a melding/modification of that concept with structure of other simple clipboard manipulation macros I use could produce a hardcoded RegEx replace that would operate on clipboard contents. ie: you copy your ready to upload code to the clipboard, whack ALT-Shift-Win-O (could be made to be whatever), and it does the RegEx leading space strip of the clipboard contents, and place the new fixed contents on the clipboard to be pasted in the eBay description editor.
 

>>Do you think it would work instead of doing Shipscripts method of filtering the whitespaces, or just for the leading ones?

Sure. I didn't look at shipscript's filter, but I'm sure it's awesome, complete, and gets the job done as always. Comes down to workflow and personal preferences.


>>I do like having software solutions instead of a link if possible in case the webpage changes or disappears.

I've never been able to buy into the "online" utility thing - especially if anything with personal or customer info is uploaded to be processed. I sometimes grab online tools and make them local, but still prefer old fashioned disk based utilities, preferably command line for routine functions because their invocation can be batched or scripted.

 

Message 29 of 42
latest reply

Re: Trouble with eBays Listing Editor causing HTML and CSS issues

@wolfesmetalfabrication

 

Here is the online code stripper.

http://www.isdntek.com/listingtools/compress.htm

The button called "Left Align" should do what you need.

 

All the tools that @berserkerplanet  and I have offered utilize RegEx (Regular Expression) substitutions, so they are all very powerful and should all be able to do pretty much the same thing.

ShipScript has been an eBay Community volunteer since 2003, specializing in HTML, CSS, Scripts, Photos, Active Content, Technical Solutions, and online Seller Tools.
Message 30 of 42
latest reply