Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
runcon
Plantuml Server
Commits
a3bd2a1b
Commit
a3bd2a1b
authored
Sep 17, 2013
by
maximesinclair
Browse files
[FEATURE] url parameter can be used to decode a diagram
for example : /plantuml/form?url=AqijAixCpmC0
parent
8c874c2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java
View file @
a3bd2a1b
...
...
@@ -121,18 +121,18 @@ public class PlantUmlServlet extends HttpServlet {
Transcoder
transcoder
=
getTranscoder
();
// the URL form has been submitted
if
(
url
!=
null
&&
!
url
.
trim
().
isEmpty
())
{
// Catch the last part of the URL
// Catch the last part of the URL
if necessary
Matcher
m1
=
urlPattern
.
matcher
(
url
);
if
(
m1
.
find
())
{
// Check it's a valid compressed text
url
=
m1
.
group
(
1
);
Matcher
m2
=
encodedPattern
.
matcher
(
url
);
if
(
m2
.
find
())
{
}
// Check it's a valid compressed text
Matcher
m2
=
encodedPattern
.
matcher
(
url
);
if
(
m2
.
find
())
{
url
=
m2
.
group
(
0
);
text
=
transcoder
.
decode
(
url
);
}
else
{
System
.
out
.
println
(
"PlantUML ERROR Not a valid compressed string : "
+
url
);
}
}
else
{
System
.
out
.
println
(
"PlantUML ERROR Not a valid compressed string : "
+
url
);
}
}
// the Text form has been submitted
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment