-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite strip_nastyhtml, strip_html in Qt (#1341)
* rewrite strip_html with QString. * rewrite strip_nasty_html in Qt. and actually produce valid html: 1. the replacement for "<body>", "<! >", is invalid. 2. leaving an html tag in causes the html format output to be invalid. * cleanup comment xstrdup * use regex for strip_html * strip_html deletes other tags * fix strip_html img tag handling * Revert "fix strip_html img tag handling" This reverts commit b0440f7. * Revert "strip_html deletes other tags" This reverts commit 40fe2ef. * Revert "use regex for strip_html" This reverts commit 677da95. * implement strip_html using QRegularExpressionMatchIterator. * a little cleanup * remove obsolete include * take care to distinguish tags with common roots like p, param, pre. * suppress InvalidReads in qhash. These are known to occur per comment in qhash.cpp. * supress qhash false positive with libqt6core6/jammy-updates,now 6.2.4+dfsg-2ubuntu1.1 amd64 * suppress vg warnings on noble (intermittant). * install qt core dbgsyms for valgrind suppression. * kill space preceding newline when stripping html. * use modernize-raw-string-literal * valgrind suppressions for f40 * add symbols for fedora valgrind suppression.
- Loading branch information
Showing
17 changed files
with
284 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<gpx xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" creator="Groundspeak, Inc. All Rights Reserved. http://www.groundspeak.com" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd http://www.groundspeak.com/cache/1/0/1 http://www.groundspeak.com/cache/1/0/1/cache.xsd" xmlns="http://www.topografix.com/GPX/1/0"> | ||
<name>Cache Listing Generated from Geocaching.com</name> | ||
<desc>This is an individual cache generated from Geocaching.com</desc> | ||
<author>Account "robertlipe" From Geocaching.com</author> | ||
<email>contact@geocaching.com</email> | ||
<url>https://www.geocaching.com</url> | ||
<urlname>Geocaching - High Tech Treasure Hunting</urlname> | ||
<time>2023-10-25T00:44:53.7176739Z</time> | ||
<keywords>cache, geocache</keywords> | ||
<bounds minlat="35.921667" minlon="-86.861667" maxlat="35.921667" maxlon="-86.861667" /> | ||
<wpt lat="35.921667" lon="-86.861667"> | ||
<time>2003-06-29T00:00:00</time> | ||
<name>GCGCA8</name> | ||
<desc>Oozy rat in a sanitary zoo by robertlipe, Unknown Cache (3/2)</desc> | ||
<url>https://www.geocaching.com/geocache/GCGCA8</url> | ||
<urlname>Oozy rat in a sanitary zoo</urlname> | ||
<sym>Geocache</sym> | ||
<type>Geocache|Unknown Cache</type> | ||
<groundspeak:cache id="77386" available="False" archived="True" xmlns:groundspeak="http://www.groundspeak.com/cache/1/0/1"> | ||
<groundspeak:name>Oozy rat in a sanitary zoo</groundspeak:name> | ||
<groundspeak:placed_by>robertlipe</groundspeak:placed_by> | ||
<groundspeak:owner id="32733">robertlipe</groundspeak:owner> | ||
<groundspeak:type>Unknown Cache</groundspeak:type> | ||
<groundspeak:container>Not chosen</groundspeak:container> | ||
<groundspeak:attributes> | ||
<groundspeak:attribute id="24" inc="0">Wheelchair accessible</groundspeak:attribute> | ||
<groundspeak:attribute id="19" inc="1">Ticks</groundspeak:attribute> | ||
<groundspeak:attribute id="18" inc="1">Dangerous animals</groundspeak:attribute> | ||
<groundspeak:attribute id="17" inc="1">Poisonous plants</groundspeak:attribute> | ||
<groundspeak:attribute id="39" inc="1">Thorns</groundspeak:attribute> | ||
<groundspeak:attribute id="30" inc="1">Picnic tables nearby</groundspeak:attribute> | ||
<groundspeak:attribute id="28" inc="1">Public restrooms nearby</groundspeak:attribute> | ||
<groundspeak:attribute id="1" inc="1">Dogs</groundspeak:attribute> | ||
</groundspeak:attributes> | ||
<groundspeak:difficulty>3</groundspeak:difficulty> | ||
<groundspeak:terrain>2</groundspeak:terrain> | ||
<groundspeak:country>United States</groundspeak:country> | ||
<groundspeak:state>Tennessee</groundspeak:state> | ||
<groundspeak:short_description html="True"><body>The cache is <style> | ||
not</style> at the coordinates above. These coords will get | ||
you to the correct park and within 1/2 mile of the cache. The cache | ||
is within 35 feet of the trail. It is not handicapped accessible. | ||
It is a nice walk in the woods that is practical for all ages. | ||
There is no space in the container for trading items. You should | ||
bring a writing stick and bug spray is recommended.</body> | ||
</groundspeak:short_description> | ||
<groundspeak:long_description html="True"><html><body text="color">So if the cache isn't at the above coordinates, where is it? | ||
<ul> | ||
<li>Too bad I hid a boot</li> | ||
<li>Too hot to hoot</li> | ||
<li>Never odd or even</li> | ||
<li>Do geese see God?</li> | ||
<li>"Do nine men interpret?" "Nine men," I nod</li> | ||
<li>Rats live on no evil star</li> | ||
<li>Go hang a salami, I'm a lasagna hog</li></ul> | ||
Now that it's intuitively obvious to even the most casual observer | ||
where the cache is, turn on your geo-mojo and go find it. <br> | ||
<image src="http://www.mtgc.org/mtgc_member-banner.gif" width="500" | ||
height="40" alt= | ||
"Member of Middle Tennessee GeoCachers Club [www.mtgc.org]" | ||
border="0"><br> | ||
<br></body></html> | ||
</groundspeak:long_description> | ||
<groundspeak:encoded_hints> | ||
</groundspeak:encoded_hints> | ||
<groundspeak:logs> | ||
<groundspeak:log id="732879189"> | ||
<groundspeak:date>2017-11-11T01:44:14Z</groundspeak:date> | ||
<groundspeak:type>Archive</groundspeak:type> | ||
<groundspeak:finder id="32733">robertlipe</groundspeak:finder> | ||
<groundspeak:text encoded="False">Removed the container from the final location. Enough construction has occurred since this was placed to make it much less of an adventure than is used to be, so I'm archiving. | ||
|
||
Thanx to all that hunted it.</groundspeak:text> | ||
</groundspeak:log> | ||
</groundspeak:logs> | ||
<groundspeak:travelbugs /> | ||
</groundspeak:cache> | ||
</wpt> | ||
</gpx> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>GPSBabel HTML Output</title> | ||
<style> | ||
p.gpsbabelwaypoint { font-size: 120%; font-weight: bold } | ||
</style> | ||
</head> | ||
<body> | ||
<p class="index"> | ||
<a href="#WPT001">GCGCA8 - Oozy rat in a sanitary zoo</a><br> | ||
</p> | ||
<div id="WPT001"><hr> | ||
<table style="width:100%"> | ||
<tr> | ||
<td> | ||
<p class="gpsbabelwaypoint">GCGCA8 - N35°55.300 W86°51.700 (16S 512480 3975269)<br> | ||
<a href="https://www.geocaching.com/geocache/GCGCA8">Oozy rat in a sanitary zoo</a> by robertlipe</p> | ||
</td> | ||
<td style="text-align:right"> | ||
<p class="gpsbabelcacheinfo">3 / 2<br> | ||
Unknown Cache / Unknown</p> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td colspan="2"> | ||
<div><p class="gpsbabeldescshort">The cache is at the coordinates above. These coords will get | ||
you to the correct park and within 1/2 mile of the cache. The cache | ||
is within 35 feet of the trail. It is not handicapped accessible. | ||
It is a nice walk in the woods that is practical for all ages. | ||
There is no space in the container for trading items. You should | ||
bring a writing stick and bug spray is recommended.</div> | ||
<div><p class="gpsbabeldesclong">So if the cache isn't at the above coordinates, where is it? | ||
<ul> | ||
<li>Too bad I hid a boot</li> | ||
<li>Too hot to hoot</li> | ||
<li>Never odd or even</li> | ||
<li>Do geese see God?</li> | ||
<li>"Do nine men interpret?" "Nine men," I nod</li> | ||
<li>Rats live on no evil star</li> | ||
<li>Go hang a salami, I'm a lasagna hog</li></ul> | ||
Now that it's intuitively obvious to even the most casual observer | ||
where the cache is, turn on your geo-mojo and go find it. <br> | ||
<img src="http://www.mtgc.org/mtgc_member-banner.gif" width="500" | ||
height="40" alt= | ||
"Member of Middle Tennessee GeoCachers Club [www.mtgc.org]" | ||
border="0"><br> | ||
<br></div> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,4 +189,5 @@ if [ -z "${VALGRIND}" ]; then | |
fi | ||
fi | ||
|
||
echo "Total Errors: $errorcount" | ||
exit $errorcount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.