diff options
| author | 2022-02-28 20:22:43 +0100 | |
|---|---|---|
| committer | 2022-02-28 20:22:43 +0100 | |
| commit | 1fe66ad020ca8f0560bb9c6e311852ed77228f78 (patch) | |
| tree | df78da3f33a9f13a9d6ba3f2744c369bd6e313a6 /lib/Minz | |
| parent | fa23ae76ea46b329fb65329081df95e864b03b23 (diff) | |
Implement Web scraping "HTML + XPath" (#4220)
* More PHP type hints for Fever
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4201
Related to https://github.com/FreshRSS/FreshRSS/issues/4200
* Detail
* Draft
* Progress
* More draft
* Fix thumbnail PHP type hint
https://github.com/FreshRSS/FreshRSS/issues/4215
* More types
* A bit more
* Refactor FreshRSS_Entry::fromArray
* Progress
* Starts to work
* Categories
* Fonctional
* Layout update
* Fix relative URLs
* Cache system
* Forgotten files
* Remove a debug line
* Automatic form validation of XPath expressions
* data-leave-validation
* Fix reload action
* Simpler examples
* Fix column type for PostgreSQL
* Enforce HTTP encoding
* Readme
* Fix get full content
* target="_blank"
* gitignore
* htmlspecialchars_utf8
* Implement HTML <base>
And fix/revert `xml:base` support in SimplePie https://github.com/simplepie/simplepie/commit/e49c578817aa504d8d05cd7f33857aeda9d41908
* SimplePie upstream PR merged
https://github.com/simplepie/simplepie/pull/723
Diffstat (limited to 'lib/Minz')
| -rw-r--r-- | lib/Minz/Url.php | 7 | ||||
| -rw-r--r-- | lib/Minz/View.php | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php index be3184b40..40cadb49a 100644 --- a/lib/Minz/Url.php +++ b/lib/Minz/Url.php @@ -121,7 +121,8 @@ class Minz_Url { /** * @param string $controller * @param string $action - * @param string ...$args + * @param string|int ...$args + * @return string|false */ function _url ($controller, $action, ...$args) { $nb_args = count($args); @@ -132,8 +133,8 @@ function _url ($controller, $action, ...$args) { $params = array (); for ($i = 0; $i < $nb_args; $i += 2) { - $arg = $args[$i]; - $params[$arg] = $args[$i + 1]; + $arg = '' . $args[$i]; + $params[$arg] = '' . $args[$i + 1]; } return Minz_Url::display (array ('c' => $controller, 'a' => $action, 'params' => $params)); diff --git a/lib/Minz/View.php b/lib/Minz/View.php index 431a8b700..6cf811bff 100644 --- a/lib/Minz/View.php +++ b/lib/Minz/View.php @@ -112,6 +112,12 @@ class Minz_View { } } + public function renderToString(): string { + ob_start(); + $this->render(); + return ob_get_clean(); + } + /** * Ajoute un élément du layout * @param string $part l'élément partial à ajouter |
