This implements some of the changes discussed in #2314:
1. last mod and number of hits are on the same line and always shown
2. There is a class around the last mod string so it can be
hidden/replaced by an icon
3. All items in the resultBody returned by the event are wrapped in
`<dd>` tags to ensure validity. They get their array key as class
4. There is still a wrapper div around each result for styling purposes
Recent changes to the search results page added various divs
to the pre-existing description list, which is invalid.
This fixes that by a) removing a couple of unnecessary elements
and b) interpret the 'last modified' line as another 'dd'.
The search buttons from the search form on the top of the page
as well as the search page both produce invalid HTML
due to the name attribute being empty.
As the name is required for each of the PHP functions
producing the buttons and is passed as an empty string,
this makes sure that parameters with empty strings get skipped.
Before this change, HTML and some JS code (as far as it was not escaped
by json_encode) could be injected into the output as the closing pattern
that is checked by the regex is not escaped in JSON (see test case).
The displayed message now shows the target that was passed, which should
help identifying the troubling plugin.
Instead of failing, we fix the data ourselves - this code will be
removed in the future.
This fixes a bug that would occur if the DokuHTTPClient receives a 204
response, e.g. as a result for a request to delete something. It would
still try to read the body, which fails, thus producing a timeout and
finally throwing an exception.
This fix instructs the HTTPClient to not read the (not existing) body if
it receives a 204.
* private_testing: (375 commits)
make testing of inaccessible methods easier
updated composer dependencies
renamed ActionRouter::checkPermissions to checkPreconditions
shortened new search configs
Section edit: corrected pattern 'SEC_EDIT_PATTERN'
fix regex character class. fixes#2301
fix: switch extensions if stylesheet in style.ini doesn't exist
refactor: rename and move function to set $JSINFO
typo. capital P for class name
fix: add missing global $ACT for $JSINFO
refactor: use native json_encode for $JSINFO
refactor: rename JSINFO.DOKU_UHN and JSINFO.DOKU_UHC
refactor: extract $JSINFO initialization into tpl_ function
refactor: rename dta and dtb parameters
doc(search): parameter must be string or false
doc(search): highlight is expected to be an array
show adavanced tools with JavaScript only
adjusted language files to remove outdated string
removed sub header from all languages
added aria attributes
...
While it's generally frowned upon testing privates, it can often be
useful and the easier way to write tests. Eg you want to test something
complicated method that is important, but you do not want to expose it
directly to other classes...
This new method uses reflection to make access to such methods possible
from within tests without the need for intermediate classes.
shorter names are more in line with what we already use, makes less
layout problems in the documentation and is easier to type when telling
people about it.
This should give us some backwards compatibility for changing files in
dokuwiki template from .css to .less
This way template authors get a warning to adjust their template, it
won't break right away.
This should prevent breaking search pages in other templates due to
pull request #2286 .