Questions tagged [tidy]

Tidy is a C library for cleaning up "bad" HTML. Don't use this tag for questions about keeping your code tidy.

Tidy is a library written in C for converting HTML that is syntactically incorrect to correct HTML or to XHTML. Especially useful when you are scraping web pages with curl and XML parsing functions because XML parsing functions don't accept bad HTML. Extensions for Tidy are available in PHP and Perl. The Tidy extension in PHP supports functions to covert bad HTML to XHTML with various options like dropping deprecated tags like font tag and hiding comments and dropping proprietary tags and dropping empty paragraphs and a lot more.

571 questions
4
votes
6 answers

Merge 2 variables vertically R tidyverse

I conducted a survey in 2 languages and I want to combine the questions in the 2 languages into one variable. The answers of the form are all in the same data.frame. The date is my primary key. Unfortunately I am still new to R and could not find…
Josse_
  • 111
  • 8
4
votes
2 answers

Get K nearest neighbors based on latitude and longitude

I have latitude and longitude data for different points. This is a simple version of my data: # Add library library(tidyverse) # Generate data distance <- tibble( location = c("first", "second", "third"), lat = c(33.720792, 33.715187,…
4
votes
1 answer

what is the difference between tidy functions parseString(),repairString(),cleanRepair()

I have just begun using tidy but i am confused by its functions parseString(), repairString(), cleanRepair(). i have gone through the php.net manual and other sites but can get it? the php manual says that parseString() parses the document stored in…
lovesh
  • 5,235
  • 9
  • 62
  • 93
4
votes
0 answers

How to extract tidy draws from brms models (tidybayes) for interaction terms

I ran this model using the brms package: fit<-brm(scoreAMI2~ year2011 + year2012+ year2013+ year2014+ (1|sysid)+ (1|hrr)+ (1|sysid:hrr), data=standata, prior=priors,warmup = 1000, iter = 2000, chains = 4, control = list(adapt_delta = 0.95)) I am…
micaaron
  • 41
  • 1
4
votes
0 answers

HTML tidy linter:

I'm using tidy 5.2.0. The following works fine and shows no tidy linting errors: However, if I place the button in a span tag, tidy…
user1234795
  • 113
  • 1
  • 6
4
votes
1 answer

R ttest looping over grouping variable using tidy

I have seen very similar questions to this but still can't figure this simple problem out. I want to run paired t-tests over a grouping variable and store the results in a dataframe. The command tidy in package broom does this but when I run the…
user63230
  • 4,095
  • 21
  • 43
4
votes
1 answer

Tool to correct invalid CSV files

Is there any command-line tool or ruby library to clean/correct invalid .csv files, something like tidy for html? Example of error: unescaped non-successive double quotes. Related to: Regular expression to find and replace unescaped Non-successive…
Vlad Zloteanu
  • 8,464
  • 3
  • 41
  • 58
4
votes
1 answer

How to remove all attributes and classes from HTML with tidy?

I have a lot of HTML files such as:

some text

Dimetry
  • 143
  • 8
4
votes
2 answers

HTML Tidy on partial files?

I've got a punch of Django template files that I want to use tidy to clean up. However, it inserts all this doctype and header junk that I don't want. Mainly, I just want it to fix the indentation. All the other stuff is just extra. Does tidy even…
mpen
  • 272,448
  • 266
  • 850
  • 1,236
4
votes
1 answer

Why can't my PHP exec() on a bash tidy command open the file?

Please bear with me (I'm just learning how to use php). I can't figure out if my tidy error is related to an incorrect wget command or in itself. I thought my wget command was grabbing the remote file and placing it into my $link directory on my…
arl
  • 123
  • 1
  • 9
4
votes
0 answers

Atom - linter-tidy not linting

I'm having an issue setting up atom for html. I installed linter for atom and linter-tidy linked from the atom linter's website. I put tidy.exe in C:/tidy/tidy.exe. In the linter-tidy settings I've tried no path to tidy, C:/tidy/tidy.exe and…
4
votes
1 answer

ASP.NET MVC "Tidy" Html on the fly

I'm wondering if there's any kind of tool out there to Tidy Html on the fly. Currently in my app, I use a MasterPage and then my Views are loaded into the Masterpage. The problem is that the always adds additional…
Chase Florell
  • 46,378
  • 57
  • 186
  • 376
4
votes
1 answer

XSS Prevention, Tidy vs Purifier?

Greetings, I'm trying to prevent XSS and improper html from input fields using CKEditor (a javascript WYSIWYG editor). How should I filter this data on the server side? The two options I'm comparing are PHP Tidy and HTML Purifier. I'm interested…
pws5068
  • 2,224
  • 4
  • 35
  • 49
4
votes
1 answer

Encoding problem wirh JDBC and MySQL

I'm grabbing data from RSS-channels, sanitize it and save in the database. I use java, tidy, MySQL and JDBC. Steps: I grab RSS-records. It's OK. I sanitize html with tidy. Here is one transformation. Tidy automatically converts strings like "So…
Alexei
  • 231
  • 1
  • 2
  • 11
4
votes
3 answers

Git - tidying up a repo

I have got my repo into a bit of a state and want to be able to work my way out of it The repo looks a bit like this (A1, B1, C1 etc are obviously commits) A1 ---- A2 ---- A3 ---- A4 ---- A5 ---- A6 ---- A7 ---- A8 …
Simon Woods
  • 2,223
  • 4
  • 27
  • 34