Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local documentation links have non escaped BB code shown to the user #16130

Closed
williamdes opened this issue May 19, 2020 · 0 comments
Closed
Assignees
Labels
Bug A problem or regression with an existing feature good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete help wanted newbie
Projects
Milestone

Comments

@williamdes
Copy link
Member

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Have mysqli extension missing
  2. Have local documentation built (cd doc && make html)

Expected behavior

Show a link to local documentation

Screenshots

image

Server configuration

  • phpMyAdmin version: 5.x

Additional context

See Core::sanitizeMessage to start the fix and apply the patch to have a test case

diff --git a/test/classes/MessageTest.php b/test/classes/MessageTest.php
index 1199f71574..ecd2db9066 100644
--- a/test/classes/MessageTest.php
+++ b/test/classes/MessageTest.php
@@ -428,6 +428,10 @@ class MessageTest extends PmaTestCase
                 . 'latest%2Fsetup.html%23foo" '
                 . 'target="documentation">link</a>',
             ],
+            [
+                '[a@doc/html/faq.html#faqmysql@documentation]link[/a]',
+                '<a href="doc/html/faq.html#faqmysql">link</a>',
+            ],
         ];
     }

Run: ./vendor/bin/phpunit --filter=testDecodeBB --no-coverage

Use branch: QA_5_0 as a base branch to the fix and the PR

@williamdes williamdes self-assigned this May 23, 2020
@williamdes williamdes added this to the 5.0.3 milestone May 23, 2020
@williamdes williamdes added this to Needs triage in issues via automation May 23, 2020
@williamdes williamdes added the Bug A problem or regression with an existing feature label May 23, 2020
@williamdes williamdes moved this from Needs triage to Reproduced in issues May 23, 2020
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label May 23, 2020
williamdes added a commit that referenced this issue May 23, 2020
Pull-request: #16135
Fixes: #16130

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue May 23, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Reproduced to Closed May 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete help wanted newbie
Projects
issues
  
Closed
Development

No branches or pull requests

1 participant