Official Horse Phenomena > Official Announcements > Post Reply     

HTML Purifier

Player Avatar
Master Administrator Samantha - see page to know who to contact directly!
November 3rd, 2019 4:01:56pm
4,333 Posts

Hello HP!


The HTML Purifier is officially live! This will go into effect when you click "Update Settings" on your page.


If you need it, you can find your old layout code with the link above your Description box that says "View HTML pre-HTMLpurifier".


To fix your pages after you update: Click here for HTML Purification Guide.


It will also be running on club pages (these you will need to copy/paste and SAVE your layout code before updating just in case, or you could lose your CSS), and in the forums (we don't anticipate huge changes in the forums since there's not a lot of coding happening there).


As always, let us know if you need any assistance!


Happy Sunday!


-Sam




 


View Comments 1


Player Avatar
mangobi-wan ✨ hello there
November 3rd, 2019 7:21:29pm
2,908 Posts


Aaaaand as is the way of things, I've stumbled upon issues with my coding :P So I'm posting here to let people know about any issues I find after activating the purifier, specifically with my coding but to help others too. 

1. If you updated your page and therefore initiated the purifier, and then all or most of your tab content disappeared (even though you're sure you did everything right when changing the tab links), check the NOTE TAGS. The ones that look like this: < !-- (without the space). The purifier will nom those up if they don't look exactly like the one whitelisted: < !-- (again, without the space). So extra ---- or no ! or a space in between < and ! and/or -- will be eaten by the purifier and then make your content go poof. Also, check the end tag for the note tag! This is actually the part that's making your content disappear (the browser sees an open note tag but no closing one because the purifier ate it, and therefore all your content is now hidden in a note). The end tag should look exactly like this: -- > (without the space). If there's only one - and/or a space in between -- and >, it's not correct and your content will still go poof.

2. If there is an external stylesheet included in your coding (most of my codes had a stylesheet for my little credit button), you can copy the link in the href section of the tag, paste it into a new tab/window, and it will show you the CSS in that stylesheet. Just copy the whole thing and paste it in the new CSS box on HP (in addition to all the stuff inside the style tag). That should get everything that was styled in the stylesheet working again.

3. Google Fonts gone? First, open up the previous version of your layout (pre-HTML purifier - like Sam said, there's a link right above your layout content box). Scroll down to where the Google font link is, it lists all the fonts used in your layout. Now open Google Fonts and search for each of those fonts. When you find one, click the red plus sign at the top of that font's box. Do this for all your fonts. When you're done, go to the bottom right of the window and click the dark bar that says "# Families Selected." Under the Embed tab (which should be the default tab), click the @import button and copy the text inside of the style tags. Just paste that at the top of your CSS and your fonts should be back ^^

4. If your scrolls/expandables aren't working - check to see if they have inline CSS - meaning the style attribute inside the div (< div style="height: 400px; overflow: auto; " >). Currently, the purifier is eating a lot of inline CSS, including the overflow property. I've talked with Sam and she's aware of the bug, but until it's fixed, you need to put all that inline CSS into an element ID or class in the stylesheet. So step by step:
          1. Add an ID or class name to your element (ID is for only one element, a class can be used across multiple elements). It should look like this: < div id="idname" > OR < div class="classname" >
          2. Go to your CSS box and add the ID or class name. For IDs, you need to put #idname { styles here }. For classes, you need to put .classname { styles here }.
          3. Inside the curly brackets, you can copy and paste all the inline CSS that came after the style attribute and between the "" marks. 
          4. Now, go back to your element and delete the entire style attribute, so that < div class="classname" style="height: 400px; overflow: auto;" > becomes < div class="classname" >
          5. Your scrolls/expands should be working now!
Coders, until this bug gets fixed, it's best to avoid inline CSS completely. If you need to style an element, use classes/IDs and style them in the stylesheet.

5. Check your tables! Before the purifier, you could leave off the end tags for content inside table cells and even the end td or tr tag, but that's a no-no now! Go over your tables cell by cell to make sure that each one has a closing td tag, and every row has its closing tr tag. The table structure/syntax needs to always look like this (although the number of cells and rows is completely up to you, of course):
          < table >
               < tr >
                    < td >One row, one column, one cell.< /td >
               < /tr >
          < /table >




 

Player Avatar
уαмαѕαωкι
November 3rd, 2019 11:36:38pm
3,512 Posts

Also good to mention, because this took me way too long to realize, -facepalm- is that the guide for the code needs to be followed exactly, capitalization, spaces (lack there of). I couldn't figure it out until I realized that I couldn't have an underscore in tab content. 




dogs-cats.gif

 

Player Avatar
Kyliga |:| Whimsical Wolves
November 19th, 2019 3:28:40pm
77 Posts

Got a second job and been super busy so I haven't dealt with my layout yet. Is there a point that I need to get it converted before the purifier takes effect irregardless of whether I hit update or not? 




"There is a wide, yawning black infinity. In every direction, the extension is endless; the sensation of depth is overwhelming. And the darkness is immortal. Where light exists, it is pure, blazing, fierce; but light exists almost nowhere, and the blackness itself is also pure and blazing and fierce."
-Carl Sagan

 

Player Avatar
Master Administrator Samantha - see page to know who to contact directly!
November 21st, 2019 12:52:38pm
4,333 Posts

Nope, it'll stay the way it is until you update, because the code gets purified when it's updated.




 

Player Avatar
Jaya • Those who don't try never look foolish
November 21st, 2019 12:56:17pm
24,592 Posts

Yay. :) That makes things easier!




PksILXD.png

 

Player Avatar
Kyliga |:| Whimsical Wolves
November 21st, 2019 2:03:04pm
77 Posts

Woot, thanks! 




"There is a wide, yawning black infinity. In every direction, the extension is endless; the sensation of depth is overwhelming. And the darkness is immortal. Where light exists, it is pure, blazing, fierce; but light exists almost nowhere, and the blackness itself is also pure and blazing and fierce."
-Carl Sagan

 

View Comments 1