Commit graph

1944 commits

Author SHA1 Message Date
Gunter Labes
51f250ca8e
Use a more generic default value 2018-01-08 23:45:23 +01:00
Gunter Labes
f423bd083f
Use a more generic default value 2018-01-08 23:42:40 +01:00
Ignacio R. Morelle
0e707d641e wam: Fix HTML injection attack on the add-ons.wesnoth.org web interface
This escapes all strings provided by add-ons server data to guarantee
they can't be used to get extraneous and potentially harmful HTML into
the generated web index.

However, and because I don't have time to look into the dense regex
contained in the relevant code right now, it also removes the hidden
feature of linkifying any URLs found in add-on descriptions. It's a
small price to pay for our safety, really.
2017-07-24 03:05:34 -04:00
Allefant
319f9b7e9a fix typo 2017-01-27 09:58:00 -05:00
Allefant
2f713046f0 [wmlunits] ignore translation errors from gettext 2017-01-27 09:57:47 -05:00
Allefant
ad92b02f8c [wmlunits] use scons as cmake seems broken right now 2017-01-27 09:57:11 -05:00
Ignacio R. Morelle
92760fe1e5 wmllint: Ignore id in [trait] for unit id checks 2015-11-06 00:08:49 -03:00
Ignacio R. Morelle
436e808528 wmllint: Recognize [background_layer] in [part] 2015-06-27 18:25:45 -03:00
Ignacio R. Morelle
a1e2903c59 wmllint: Quick and dirty hack to recognize [+tags] in [part] 2015-06-27 18:25:24 -03:00
Ignacio R. Morelle
3f74235311 wmliterator: Add function to detect [+tags] 2015-06-27 18:10:12 -03:00
Ignacio R. Morelle
42cd28682d Remove broken Python port of wmlxgettext 2015-06-21 22:43:45 -03:00
Elvish_Hunter
32fb510a29 wmlindent: backported b6250ff 2015-05-29 11:48:56 +02:00
Groggy Dice
86b065fd79 wmliterator: fix unterminated loop in lua-strip
An old add-on triggered a wmliterator crash with this comment:

    #>>>> !!!!! REMOVE THIS AFTER TEST !!!!! <<<<#

The traceback showed that the crash came from the lua-stripping
code, which interprets "<<" as the start of a lua string. But below
it is code to remove quoted strings, and it doesn't crash, even
though there are cases where authors forgot to close a quote.

Two key differences stood out in the otherwise similar second
code: only looking for the endquote string in the text after
beginquote, and testing that endquote was less than 0, not -1.

Changing both gets the loop to terminate. Making it search the
text only after "beginquote+2" means that ">>" will no longer
be found, giving endquote a value of -1. But -1 is not less than
-1, so that must be changed to " < 0" to close the loop.
2015-05-11 02:40:00 -04:00
Elvish_Hunter
a886387ad1 wmllint: backported better fix for bug #23217 2015-04-08 22:47:10 +02:00
Ignacio R. Morelle
7dc4f627ce wmllint: Print expected side num when reporting out-of-sequence sides 2015-04-07 22:14:14 -03:00
Ignacio R. Morelle
62dd94a55a Exclude data/test from reindent target
wmlindent currently breaks things in there due to data/test containing
multiple triggers for bug #22264.
2015-04-07 21:07:17 -03:00
Elvish_Hunter
0964d448b0 wmllint: handle variation_name translatable attribute. Fixes bug #23217 2015-04-08 00:05:40 +02:00
Elvish_Hunter
506a9b36ca WML tools GUI: backported improvements from master 2015-04-07 17:42:02 +02:00
Elvish_Hunter
94f62b6555 GUI.pyw: fixed the 3rd column width in the wmlindent tab 2015-01-23 21:44:50 +11:00
Elvish_Hunter
4bb2b733cb GUI.pyw: fixed wording of an option 2015-01-23 21:44:48 +11:00
Elvish_Hunter
254a605dff GUI.pyw: reworked verbosity options to fix a bug reported by vultraz 2015-01-23 21:44:46 +11:00
Elvish_Hunter
6d1bb2e767 GUI.pyw: check if the user already selected a folder, and use it in the directory selection dialog if so 2015-01-23 21:44:44 +11:00
Charles Dang
20be4c74f7 wmltools GUI: fixed wording of wmlindent -v -v toggle 2015-01-23 19:04:17 +11:00
Elvish_Hunter
68bdbae325 GUI.pyw: removed a line that I used while developing the latest modifications 2015-01-23 19:04:14 +11:00
Elvish_Hunter
d4b72f84bd GUI.pyw: added a Clear button to the directory selection box 2015-01-23 19:04:12 +11:00
Elvish_Hunter
f36f5ff5d6 GUI.pyw: use a better error message when Skip core directory is on and there is no directory selected. Also add a missing comment 2015-01-23 19:04:09 +11:00
Elvish_Hunter
5c4f20115f GUI.pyw: force Disable checks for unknown units when Skip core directory is enabled 2015-01-23 19:04:06 +11:00
Charles Dang
2b12de7ca0 wmltools GUI: use utf8 copyright symbol instead of '(C)' in About 2015-01-23 19:04:04 +11:00
Charles Dang
1c9b607cab wmltools GUI: Added option to skip core when running wmllint 2015-01-23 19:04:01 +11:00
aquileia
e13a477fb6 gitignore: Merge rules from doc/ and data/tools 2015-01-13 19:28:12 +01:00
Ignacio R. Morelle
1398133eac addons.w.o: New Year copyright update 2015-01-01 18:58:12 -03:00
Ignacio R. Morelle
3e5196b088 website: New Year copyright update 2015-01-01 18:58:08 -03:00
Ignacio R. Morelle
b335b1026d units.w.o: New Year copyright update 2015-01-01 18:58:04 -03:00
Charles Dang
3383d6462a Don't show ellipsecheck warning if ellipse=none 2014-12-31 15:01:26 +11:00
Elvish_Hunter
0559131941 wml tools GUI: backported all improvements and bugfixes from master 2014-11-07 16:21:12 +01:00
Fabian Müller
704e71dd82 Update of the wml emacs mode database. 2014-11-04 18:42:47 +01:00
Groggy Dice
a1ebdd8443 wmltools: split campaigns/add-ons into separate subtrees for wmlscope
The problem: wmlscope assigns each file to a directory-based subtree, and
assumes that it is visible to every other file in that subtree. The intent
is that each campaign (or add-on of another type) will be in its own
subtree.

However, wmlscope/wmltools has derived these subtrees based on what
arguments get passed to wmlscope, rather than checking whether campaigns
have actually been split out. For instance, invoking wmlscope with
"../data/core ../data/campaigns <userdata>/data/add-ons" will cause
wmlscope to see three subtrees, one of which consists of all mainline
campaigns and another that includes all the user's add-ons. This leads to
many spurious "more than one definition/resource is visible here" errors.

A wildcard like "data/campaigns/*" would be expanded to all the individual
campaign directories. However, the wmlscope user might not know that they
should do that. Also, until the glob module was imported recently, globbing
did not work in the Windows cmd shell.

The solution: declare "campaigns" and "add-ons" to be roots, and check for
their presence in the directory names. If indicated, split out the
subdirectories into their own subtrees. Since it is possible that the user
may have moved, copied, or drafted campaigns/add-ons to another folder
that isn't following Wesnoth convention, also check for that.
2014-08-14 06:00:15 -04:00
Groggy Dice
f8b0103f0c wmltools GUI: remove -f and -p wmllint options, add -m 2014-08-06 06:09:52 -04:00
Groggy Dice
975ff7b0c3 wmltools: fix wmlscope crash in collection of unresolved macro calls
While testing wmlscope without including data/core, which guarantees lots
of "unresolved" references, I got a crash pointing to this line with the
traceback: "NameError: global name 'args' is not defined".

At first, I thought the crash might have been caused by my splitting out
parse_macroref into its own function, several months ago. However, the
line is at the wrong indentation level for those "args" to be the variable
referenced here. So what "args" might have been intended?

After tracking down the commit that added "args=args" to this line, I've
concluded that this was simply a mistake. ESR isn't around to ask anymore,
but if a macro was never defined, or is not called correctly, what "args"
could be relevant?
2014-08-01 05:28:00 -04:00
Groggy Dice
6a1a369ad1 wmltools: cite define locations when "more than one definition" is visible
When "more than one resource" is visible, wmlscope tells you where they
are.  Now it will do the same for macro definitions.
2014-08-01 04:37:56 -04:00
Groggy Dice
ea380c21c4 wmlscope: import glob for Windows shell
The Windows cmd shell will not expand a globbed argument by default, in
fact it will make the argument invalid. Importing and utilizing the glob
module is needed for x-platform.

Globbing is especially important for breaking up the subtree, so wmlscope
doesn't give off "more than one resource/definition is visible here"
errors.
2014-08-01 04:34:56 -04:00
Groggy Dice
1ebadbf7c4 wmllint: split introduction into labeled sections for clarity
Also, the top paragraphs, aimed at the core developers, have been moved to
the bottom, to get to the information key to general users.
2014-08-01 03:49:33 -04:00
Groggy Dice
9ce28102bf wmllint: remove -p --progress option
This option is pretty similar in effect to -v -v. Particularly now that
some new switches have been added recently, the clutter makes it no
longer worth keeping around.

A comment notes the option's disappearance, in case anyone wonders what
happened to it or how to get the same functionality.
2014-07-29 06:09:14 -04:00
Groggy Dice
378da4cd0c wmllint: remove -f --future option
Going back through wmllint's history, it turns out that there apparently
haven't been any "experimental conversions" since 1.4. Especially since
some new switches have been added recently, the clutter makes it no longer
worth keeping around.

A comment notes the option's disappearance, in case anyone is interested
in recreating experimental conversions again.
2014-07-29 06:09:04 -04:00
Ignacio R. Morelle
40c549735f wam/html: Add add-on type labels for campaign_sp_mp and mod_mp 2014-06-26 19:18:10 -04:00
Elvish_Hunter
bc595d8038 wmltools GUI: backported bugfixes from trunk 2014-06-25 15:37:12 +02:00
Ignacio R. Morelle
3b9260d624 wam: Use a tuple for the --change-passphrase argument's metavar
Fixes its help entry looking like this:

>  --change-passphrase ADD-ON OLD NEW ADD-ON OLD NEW ADD-ON OLD NEW
>                        Change the passphrase for ADD-ON from OLD to NEW

When it really should look like this:

>  --change-passphrase ADD-ON OLD NEW
>                        Change the passphrase for ADD-ON from OLD to NEW
2014-06-12 00:29:59 -04:00
Groggy Dice
e47ebac43a wmllint: reorganize help into mode options and other options
The organization of Elvish Hunter's wmllint GUI tab suggested this change.
2014-06-10 05:59:09 -04:00
Groggy Dice
5fb9500400 wmllint: fix substitution that was missing a slash 2014-06-10 05:41:06 -04:00
Groggy Dice
a88e97b5e0 wmlscope: fix mistakes in help and options pointed out by Elvish Hunter
See EH's forum post:

http://forums.wesnoth.org/viewtopic.php?f=10&t=40397#p570438
2014-06-09 22:00:27 -04:00